“rute dalam flutter” Kode Jawaban

rute aplikasi material

///////////////////////////////////////
// Setting up routes on material app //
///////////////////////////////////////

MaterialApp(
  // Start the app with the "/" named route. In this case, the app starts
  // on the FirstScreen widget.
  initialRoute: '/',
  routes: {
    // When navigating to the "/" route, build the FirstScreen widget.
    '/': (context) => FirstScreen(),
    // When navigating to the "/second" route, build the SecondScreen widget.
    '/second': (context) => SecondScreen(),
  },
);
ByZef

rute dalam flutter

// add 
// static String routeName = '/splash';

//main.dart
routes:routes

import 'package:flutter/material.dart';
//import required file

final Map<String, WidgetBuilder> routes = {
  SplashScreen.routeName:(context) => SplashScreen(),
  OnBoard.routeName:(context) => OnBoard(),
  HomeScreen.routeName:(context)=> HomeScreen(),
};
Bijay Poudel

Jawaban yang mirip dengan “rute dalam flutter”

Pertanyaan yang mirip dengan “rute dalam flutter”

Lebih banyak jawaban terkait untuk “rute dalam flutter” di Dart

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya