step 3 : buat screen splash screen

This commit is contained in:
sindhu
2025-02-15 12:01:35 +07:00
parent a3bb43c8fd
commit d70b20f5ff
9 changed files with 327 additions and 112 deletions

28
lib/app/route.dart Normal file
View File

@@ -0,0 +1,28 @@
import 'package:flutter/material.dart';
import '../screen/splash_screen.dart';
const splashRoute = "/splashRoute";
class AppRoute {
static Route<dynamic> generateRoute(RouteSettings settings) {
// splash screen
if (settings.name == splashRoute) {
return MaterialPageRoute(builder: (context) {
return MediaQuery(
data: MediaQuery.of(context)
.copyWith(textScaler: TextScaler.linear(1.0), padding: EdgeInsets.all(0)),
child: SplashScreen(),
);
});
}
return MaterialPageRoute(builder: (context) {
return MediaQuery(
data: MediaQuery.of(context)
.copyWith(padding: const EdgeInsets.all(0), textScaler: TextScaler.linear(1.0)),
child: SplashScreen(),
);
});
}
}