nester 1.2.2 copy "nester: ^1.2.2" to clipboard
nester: ^1.2.2 copied to clipboard

Flutter library to automatically convert a list of widgets in a nested group of widget.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:nester/nester.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 Nester.list([
      (next) => MaterialApp(
            title: 'Flutter Demo',
            theme: ThemeData(primarySwatch: Colors.blue),
            home: next,
          ),
      (next) => Scaffold(
            appBar: AppBar(title: const Text("Example")),
            body: next,
          ),
      (next) => Padding(
            padding: const EdgeInsets.all(20),
            child: next,
          ),
      (next) => Container(
            color: Colors.black12,
            child: next,
          ),
      (next) => Center(child: next),
      (_) => Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: const <Widget>[Text("Just a text")],
          ),
    ]);
  }
}
4
likes
140
pub points
35%
popularity

Publisher

unverified uploader

Flutter library to automatically convert a list of widgets in a nested group of widget.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on nester