bart 1.2.1 copy "bart: ^1.2.1" to clipboard
bart: ^1.2.1 copied to clipboard

A bottom navigation bar using navigator 2 for switching tabs

example/lib/main.dart

import 'package:flutter/material.dart';

import 'navigation.dart';
import 'routes.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      onGenerateRoute: routes,
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
    );
  }
}

Route<dynamic> routes(RouteSettings settings) {
  switch (settings.name) {
    case '/':
      return MaterialPageRoute(
        builder: (_) => const MainPageMenu(routesBuilder: subRoutes),
      );
    case '/parent':
      return MaterialPageRoute(
        builder: (_) => Scaffold(
          appBar: AppBar(),
          body: const Center(
            child: Text('Parent'),
          ),
        ),
      );
    default:
      throw 'unexpected Route';
  }
}
50
likes
0
pub points
77%
popularity

Publisher

verified publisherapparence.io

A bottom navigation bar using navigator 2 for switching tabs

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, universal_io

More

Packages that depend on bart