responsive_reflow 1.1.0 copy "responsive_reflow: ^1.1.0" to clipboard
responsive_reflow: ^1.1.0 copied to clipboard

Responsive & adaptive Flutter layout utilities — Material 3 window size-class breakpoints, spacing tokens, adaptive navigation scaffold, responsive builders, and foldable-aware helpers. Reflows by wid [...]

example/lib/main.dart

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

void main() => runApp(const ExampleApp());

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'responsive_reflow example',
      theme: ThemeData(useMaterial3: true),
      home: const HomePage(),
    );
  }
}

/// Demonstrates [RrAdaptiveScaffold] (bottom nav → rail → sidebar),
/// [RrResponsiveGrid], and spacing tokens — all width-driven, never scaled.
class HomePage extends StatefulWidget {
  const HomePage({super.key});

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

class _HomePageState extends State<HomePage> {
  int _index = 0;

  @override
  Widget build(BuildContext context) {
    return RrAdaptiveScaffold(
      destinations: const [
        RrDestination(icon: Icons.home_outlined, label: 'Home'),
        RrDestination(icon: Icons.grid_view_outlined, label: 'Grid'),
        RrDestination(icon: Icons.settings_outlined, label: 'Settings'),
      ],
      currentIndex: _index,
      onDestinationSelected: (i) => setState(() => _index = i),
      body: RrPageContent(
        maxWidth: 1000,
        child: RrResponsiveGrid.builder(
          maxItemWidth: 260,
          itemCount: 12,
          itemBuilder: (context, i) => Card(
            child: Padding(
              padding: RrEdgeInsets.allLg,
              child: Center(child: Text('Item ${i + 1}')),
            ),
          ),
        ),
      ),
    );
  }
}
7
likes
0
points
208
downloads

Publisher

verified publisherdartcoder.in

Weekly Downloads

Responsive & adaptive Flutter layout utilities — Material 3 window size-class breakpoints, spacing tokens, adaptive navigation scaffold, responsive builders, and foldable-aware helpers. Reflows by width; never pixel-scales.

Repository (GitHub)
View/report issues

Topics

#responsive #adaptive #layout #breakpoints #ui

License

unknown (license)

Dependencies

flutter

More

Packages that depend on responsive_reflow