auto_scaffold_easy 1.0.2 copy "auto_scaffold_easy: ^1.0.2" to clipboard
auto_scaffold_easy: ^1.0.2 copied to clipboard

A Scaffold which is ability to automatically select between [NavigationDestination] and [NavigationRailDestination] as the screen size changes

example/main.dart

import 'package:auto_scaffold_easy/auto_scaffold_easy.dart';
import 'package:flutter/material.dart';

import 'test_widget.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(useMaterial3: true),
      home: const HomePage(),
    );
  }
}

class HomePage extends StatefulWidget {
  const HomePage({super.key});

  @override
  State<HomePage> createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  @override
  Widget build(BuildContext context) {
    return const AutoScaffold(
      saveState: true,
      theme: TabTheme(labelType: LabelType.show),
      body: [
        TabItem(
          label: "Home",
          icon: Icon(Icons.home),
          selectedIcon: Icon(Icons.home_outlined),
          widget: Home(key: ValueKey("Home")),
        ),
        TabItem(
          label: "Star",
          icon: Icon(Icons.star),
          selectedIcon: Icon(Icons.star_border),
          widget: Home(key: ValueKey("Star")),
        ),
      ],
    );
  }
}
1
likes
160
points
34
downloads

Publisher

verified publisheralfiey.me

Weekly Downloads

A Scaffold which is ability to automatically select between [NavigationDestination] and [NavigationRailDestination] as the screen size changes

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on auto_scaffold_easy