Answers for "flutter getx snackbar duration"

1

flutter getx snackbar

GetMaterialApp( 
        home: Scaffold(
          appBar: AppBar(title: Text('Snackbar')),
          body: Center(
              child: ElevatedButton(
                  onPressed: () {
                    Get.snackbar('snackbar title','snackbar message');
                  },
                  child: Text('Button')),
          )
        )
      );
Posted by: Guest on September-17-2021
2

flutter snackbar duration

ScaffoldMessenger.of(context).showSnackBar(
          SnackBar(
            duration: const Duration(milliseconds: 4000), // default 4s
            content: const Text('Awesome Snackbar!'),
          ),
        );
Posted by: Guest on August-24-2021

Code answers related to "Dart"

Browse Popular Code Answers by Language