Skip to content

dariowskii/flutter_layout_demo

Repository files navigation

flutter_layout_demo

Demo creata per il Meetup CounterApp & Flutter Forward Extended Modena incentrata sull'uso del LayoutBuilder:

File: home_screen.dart

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

  @override
  Widget build(BuildContext context) {
    return LayoutBuilder(builder: (context, constraints) {
      if (constraints.maxWidth >= 1024) {
        return const DesktopHomeScreen();
      }

      if (constraints.maxWidth >= 600) {
        return const TabletHomeScreen();
      }

      return const MobileHomeScreen();
    });
  }
}

Made with ❤️ by Dario Varriale.

About

Demo Flutter responsive con LayoutBuilder

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published