bamboo 0.0.1 copy "bamboo: ^0.0.1" to clipboard
bamboo: ^0.0.1 copied to clipboard

Bamboo makes it easy and fast to build adaptive apps for mobile, web and beyond with Flutter

example/lib/main.dart

import 'package:bamboo/bamboo.dart';
import 'package:example/example/minimal/minimal.dart' deferred as box;
import 'package:flutter/material.dart';

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

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

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return BambooBreakPoint(
      child: MaterialApp(
        debugShowCheckedModeBanner: false,
        themeMode: ThemeMode.light,
        // showPerformanceOverlay: true,
        title: 'Flutter Demo',
        home: const MainPage(),
        theme: ThemeData(
          primarySwatch: Colors.blue,
        ),
      ),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return FutureBuilder<void>(
      future: box.loadLibrary(),
      builder: (BuildContext context, AsyncSnapshot<void> snapshot) {
        if (snapshot.connectionState == ConnectionState.done) {
          if (snapshot.hasError) {
            return Text('Error: ${snapshot.error}');
          }
          return box.MinimalWebsite();
        }
        return const CircularProgressIndicator(
          color: Colors.red,
        );
      },
    );
  }
}
61
likes
130
points
29
downloads

Publisher

verified publisherrexthedev.blogspot.com

Weekly Downloads

Bamboo makes it easy and fast to build adaptive apps for mobile, web and beyond with Flutter

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

flutter, rxdart

More

Packages that depend on bamboo