watch_it 1.0.4 copy "watch_it: ^1.0.4" to clipboard
watch_it: ^1.0.4 copied to clipboard

The simple state management powered by get_it. It allows to observe changes of objects inside the get_it service locator and rebuild the UI accordingly.

example/lib/main.dart

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

import 'homepage.dart';

void main() {
  registerManager();
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      home: HomePage(),
    );
  }
}

void registerManager() {
  GetIt.I.registerSingleton<WeatherManager>(WeatherManager());
}
137
likes
0
pub points
93%
popularity

Publisher

unverified uploader

The simple state management powered by get_it. It allows to observe changes of objects inside the get_it service locator and rebuild the UI accordingly.

Repository (GitHub)
View/report issues

Funding

Consider supporting this project:

github.com

License

unknown (license)

Dependencies

flutter, functional_listener, get_it

More

Packages that depend on watch_it