AlertDialog in Flutter

AlertDialog in Flutter :

This flutter tutorial post is AlertDialog in flutter. That is most important widget.

  • Press Me click open the dialog, display 2 button No, Yes.
    No press – Navigator.pop(context);
    Yes press – Navigator.of(context).pushReplacement(MaterialPageRoute(builder: (context)
  • LoginScreen()));
AlertDialog in Flutter

main.dart

import 'package:cidade_ativa/screens/login/login_screen.dart';
import 'package:cidade_ativa/tabs/login_screen_1.dart';
import 'package:flutter/material.dart';
import 'package:cidade_ativa/models/user_model.dart';
import 'package:scoped_model/scoped_model.dart';

void main() => runApp(new MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return ScopedModel<UserModel>(
      model: UserModel(),
      child: MaterialApp(
          title: "Cidade Ativa",
          theme: ThemeData(
              primarySwatch: Colors.blue,
              primaryColor: Color.fromARGB(255, 0, 191, 214)),
          debugShowCheckedModeBanner: false,
          home:  LoginScreen()),          
          
    );
  }
}

The flutter tutorial  is a website that bring you the latest and amazing resources of code. All the languages codes are included in this website. The languages like flutter, android, java,kotlin etc.with the help of this languages any user can develop the beautiful application

For more information about Flutter. visit www.fluttertutorial.in