Posts

Showing posts from July, 2022

How to dismiss flutter dialog?

Image
  To check how to use GetX in Flutter , execute the command below to create a new Flutter project. flutter create dialog And then, execute the command below to install the  GetX  package. flutter pub add get Next, let’s see how to use GetX to show  Dialog . Open Dialog You can use the  Get.dialog  function to show  Dialog  with GetX like the below. Get . dialog ( AlertDialog (), ); To check this, open the  lib/main.dart  file and modify it like the below. import 'package:flutter/material.dart' ; import 'package:get/get.dart' ; void main ( ) { runApp ( const MyApp ()); } class MyApp extends StatelessWidget { const MyApp ({ Key ? key }) : super ( key: key ); @override Widget build ( BuildContext context ) { return GetMaterialApp ( title: 'Flutter Demo' , theme : ThemeData ( primarySwatch: Colors . blue , ), home : const MyHomePage (), ); } }...