Skip to content

354651432/dart-pipeline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

dart-pipeline

dart lib to solve flutter ui callback hell

dart row style

Widget rawBuild() {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: Text(
            "Helllo World",
            style: Theme.of(context).textTheme.headline4,
          ),
        ),
      ),
    );
  }

after pipeline functional style

Widget functionalPipeLineBuild() {
    return pipeLine(
        Text(
          "Hello World",
          style: Theme.of(context).textTheme.headline4,
        ),
        [
          (child) => Center(child: child),
          (child) => Scaffold(body: child),
          (child) => MaterialApp(home: child),
        ]);
  }

after pipeline classal style

Widget classalPipeLineBuild() {
    return PipeLine<Widget>(Text(
      "Hello World",
      style: Theme.of(context).textTheme.headline4,
    ))
        .via((child) => Center(child: child))
        .via((child) => Scaffold(body: child))
        .via((child) => MaterialApp(home: child))
        .build();
  }

Releases

No releases published

Packages

No packages published

Languages