skip to Main Content

Simple Random Num Gen flutter-dart

I am trying to create random numbers after clicking the button. it works in the console but not on the UI. Need help with this. I am missing something import 'dart:math'; import 'package:flutter/material.dart'; class RandomNum extends StatefulWidget { const RandomNum({super.key});…

VIEW QUESTION

Flutter – PopScope with arguments

I am trying to navigate back to a previous screen from my current screen. OnWillPop was deprecated thus I am using PopScope with the following code canPop: true, onPopInvoked: (didPop) { Navigator.of(context).pushAndRemoveUntil(MaterialPageRoute(builder:(context)=> StepperScreen(param1: widget.param1, param2: widget.param2)),(Route<dynamic>route)=>false); }, child: Scaffold( resizeToAvoidBottomInset:…

VIEW QUESTION
Back To Top
Search