GithubHelp home page GithubHelp logo

Comments (7)

emrade avatar emrade commented on May 26, 2024

Hi @menezes85, can you give me a sample of what the custom widget looks like? So i can replicate it.

from flutter_cool_alert.

menezes85 avatar menezes85 commented on May 26, 2024
 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.

menezes85 avatar menezes85 commented on May 26, 2024
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.

menezes85 avatar menezes85 commented on May 26, 2024

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.

menezes85 avatar menezes85 commented on May 26, 2024

Any update?

from flutter_cool_alert.

menezes85 avatar menezes85 commented on May 26, 2024

Found the Error:
image

from flutter_cool_alert.

menezes85 avatar menezes85 commented on May 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.