Comments (7)
Hi @menezes85, can you give me a sample of what the custom widget looks like? So i can replicate it.
from flutter_cool_alert.
buildTravelConfirmationWidget(
{
Color? corTextNormal,
double? tamanhoTexto,
double? spaceBetweenWidgets,
FontWeight? weigthTextoNormal,
FontWeight? weigthSubtitulo,
required double valorViagem,
required String formaPagamento
})
{
return Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children:
[
RichText(text: TextSpan(text: 'Source: ',
children:
[
TextSpan(text: originController.text,
style: TextStyle(color: corTextNormal, fontWeight: weigthTextoNormal, fontSize: tamanhoTexto))
],
style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold, fontSize: tamanhoTexto))),//, textAlign: TextAlign.center),
SizedBox(height: spaceBetweenWidgets),
RichText(text: TextSpan(text: 'Destiny: ',
children:
[
TextSpan(text: destinationController.text,
style: TextStyle(color: corTextNormal, fontWeight: weigthTextoNormal, fontSize: tamanhoTexto))
], style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold, fontSize: tamanhoTexto))),//, textAlign: TextAlign.center),
SizedBox(height: spaceBetweenWidgets),
RichText(text: TextSpan(text: 'Distância: ',
children:
[
TextSpan(text: distancia,
style: TextStyle(color: corTextNormal, fontWeight: weigthTextoNormal, fontSize: tamanhoTexto))
], style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold, fontSize: tamanhoTexto))),//, textAlign: TextAlign.center),
SizedBox(height: spaceBetweenWidgets),
RichText(text: TextSpan(text: 'Type: ',
children:
[
TextSpan(text: controller.tipoCorridaSelecionado.value,
style: TextStyle(color: corTextNormal, fontWeight: weigthTextoNormal, fontSize: tamanhoTexto))
], style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold, fontSize: tamanhoTexto))),//, textAlign: TextAlign.center),
SizedBox(height: spaceBetweenWidgets),
RichText(text: TextSpan(text: 'Value: ',
children:
[
TextSpan(text: UtilBrasilFields.obterReal(valorViagem.toDouble()),
style: TextStyle(color: corTextNormal, fontWeight: weigthTextoNormal, fontSize: tamanhoTexto))
], style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold, fontSize: tamanhoTexto))),
SizedBox(height: spaceBetweenWidgets),
RichText(text: TextSpan(text: 'Payment Method: ',
children:
[
TextSpan(text: formaPagamento,
style: TextStyle(color: corTextNormal, fontWeight: weigthTextoNormal, fontSize: tamanhoTexto))
], style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold, fontSize: tamanhoTexto))),
SizedBox(height: spaceBetweenWidgets),
RichText(text: TextSpan(text: 'Elapsed Time: ',
children:
[
TextSpan(text: tempoViagem,
style: TextStyle(color: corTextNormal, fontWeight: weigthTextoNormal, fontSize: tamanhoTexto))
], style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold, fontSize: tamanhoTexto))),//, textAlign: TextAlign.center),
SizedBox(height: spaceBetweenWidgets),
SizedBox(height: spaceBetweenWidgets),
],
);
}
from flutter_cool_alert.
call:
util.showCoolAlert(text: '',
title: 'Confirm Travel ?',
barrierDismissible: false,
coolAlertType: CoolAlertType.confirm,
customWidget:
buildTravelConfirmationWidget(
weigthTextoNormal: weigthTextoNormal,
corTextNormal: corTextNormal,
tamanhoTexto: tamanhoTexto,
spaceBetweenWidgets: spaceBetweenWidgets,
weigthSubtitulo: weigthSubtitulo,
formaPagamento: formaPagamento,
valorViagem: valor
),`
from flutter_cool_alert.
on version 1.1.0 my custom widget is displayed normally, on 2.0.1, nothing is showed. i cant upgrade package without this, most part of my alerts uses custom widgets
from flutter_cool_alert.
Any update?
from flutter_cool_alert.
from flutter_cool_alert.
Return of _widget results in an Empty Container, forcing to work only if i set CoolAlertType.custom... Independent if is custom or not, customWidget When set must be displayed
from flutter_cool_alert.
Related Issues (20)
- Remove the animation at top HOT 1
- Not close dialog when clicking on ok button HOT 3
- Need more customble options HOT 1
- Small bug with dismissing alert HOT 1
- double tap in "ok" button close page HOT 1
- CoolAlertType is expecting ? but not available thats why dart giving me this below error
- Lottie animation keeps looping HOT 1
- Can move confirm button to left side? HOT 1
- How to use API to close HOT 1
- overflow problem HOT 1
- I don't know if this is a problem or not, it's just not pleasing to the eye when running flutter HOT 5
- Cancel Button Always Popping Context
- autoCloseDuration
- how can I change the color of cancel button?
- cool alert two
- Android :- On phone back press, there is no callback option available.
- add optional decorations for button
- Navigator.pushReplacement() not working on confirm button tap HOT 3
- AutoCloseDuration causing multiple renders of popup.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_cool_alert.