// ignore_for_file: prefer_const_constructors import 'package:itasmob/presentation/resources/routes_manager.dart'; import 'package:flutter/material.dart'; class MyApp extends StatefulWidget { MyApp._internal(); // private named constructor int appState = 0; static final MyApp instance = MyApp._internal(); // single instance -- singleton factory MyApp() => instance; // factory for the class instance @override _MyAppState createState() => _MyAppState(); } class _MyAppState extends State { @override Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false, initialRoute: Routes.splashRoute, onGenerateRoute: RouteGenerator.getRoute, ); } }