rush 0.1.3 copy "rush: ^0.1.3" to clipboard
rush: ^0.1.3 copied to clipboard

Rush is a powerful and flexible library for Flutter that accelerates UI development

example/lib/main.dart

import 'package:example/home.dart';
import 'package:example/middlewares.dart';
import 'package:example/models.dart';
import 'package:flutter/material.dart';
import 'package:rush/rush.dart';

void main() {
  RushEngine.init<UserTank>(UserTank(), middlewares: [LoggingMiddleware()]);
  RushEngine.registerTank<CounterTank>(CounterTank());
  runApp(const MyApp());
}

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

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return RushThemeBuilder(builder: (context, tankTheme) {
      Rush.log(tankTheme.isDark);
      return MaterialApp(
        title: 'Flutter Demo',
        themeMode: tankTheme.themeMode,
        theme: tankTheme.isDark
            ? ThemeData.dark(useMaterial3: true)
            : ThemeData(
                colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
                useMaterial3: true,
              ),
        home: const HomePage(),
      );
    });
  }
}
7
likes
0
points
41
downloads

Publisher

unverified uploader

Weekly Downloads

Rush is a powerful and flexible library for Flutter that accelerates UI development

Homepage

License

unknown (license)

Dependencies

flutter

More

Packages that depend on rush