responsive_layout_thrive 1.0.2+1 copy "responsive_layout_thrive: ^1.0.2+1" to clipboard
responsive_layout_thrive: ^1.0.2+1 copied to clipboard

A package to use responsive design in flutter.

example/example.dart

import 'package:flutter/material.dart';
import 'package:responsive_layout_thrive/responsive.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
      body: Responsive(mobileBody: const MobileBody(), tabletBody: const TabletBody(), desktopBody: const DesktopBody()),
    ),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.blue,
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.red,
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.green,
    );
  }
}
0
likes
130
points
0
downloads

Publisher

verified publisherpub.thrivedev.net

Weekly Downloads

A package to use responsive design in flutter.

Documentation

API reference

License

MIT (license)

Dependencies

cupertino_icons, flutter

More

Packages that depend on responsive_layout_thrive