flutter_command 7.2.2 copy "flutter_command: ^7.2.2" to clipboard
flutter_command: ^7.2.2 copied to clipboard

flutter_command is a way to manage your state based on `ValueListenable` and the `Command` design pattern.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_command/flutter_command.dart';
import 'package:flutter_weather_demo/weather_manager.dart';

import 'homepage.dart';

void main() {
  Command.reportAllExceptions = true;
  Command.globalExceptionHandler = (ex, stack) {
    print(ex.toString());
    print(stack.toString());
  };

  runApp(MyApp());
}

/// In a real app you would use some locator like get_it or provider
/// to access your business objects. To keep the focus on the commands we use here
/// a global variable.
WeatherManager weatherManager = WeatherManager();

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(title: 'Flutter Demo', home: HomePage());
  }
}
copied to clipboard
100
likes
140
points
2.83k
downloads

Publisher

unverified uploader

Weekly Downloads

2024.09.11 - 2025.03.26

flutter_command is a way to manage your state based on `ValueListenable` and the `Command` design pattern.

Repository (GitHub)

Documentation

API reference

License

unknown (license)

Dependencies

flutter, functional_listener, quiver, stack_trace

More

Packages that depend on flutter_command