1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Flutter] countdown/countup string timer in showDialog/Dialog

Discussão em 'Mobile' iniciado por Stack, Outubro 1, 2024 às 10:32.

  1. Stack

    Stack Membro Participativo

    everything is working but just the show dialog or dialog box cannot update the timer or cannot show the updating countdown or count up timer. And I have used just method not classes becuase I want to show the timer in front of all widgets in the screen.

    here is the code:

    void showFrostedGlassBox(BuildContext context, String timer) {
    showDialog(
    context: context,
    barrierDismissible: false, // Allows dismissing by tapping outside
    builder: (BuildContext context) {
    return Center(child: testing(timer, context),);
    },
    );
    }

    Widget testing(String timer, BuildContext context) {
    return Stack(
    children: [
    Container(
    width: 200,
    height: 200,
    decoration: BoxDecoration(
    ...
    ),
    child: Text(
    timer,
    style: TextStyle(
    ...
    ),
    ),
    ),
    ),
    // close button

    ],
    );
    }


    some data exists but not working in this case.

    Continue reading...

Compartilhe esta Página