rx_widgets 4.2.1 copy "rx_widgets: ^4.2.1" to clipboard
rx_widgets: ^4.2.1 copied to clipboard

A package with stream based Flutter Widgets that facilitate an reactive programming style.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
import 'package:rx_widget_demo/homepage/home_page.dart';
import 'package:rx_widget_demo/homepage/homepage_model.dart';
import 'package:rx_widget_demo/model_provider.dart';
import 'package:rx_widget_demo/service/weather_service.dart';

void main() {
  final weatherService = WeatherService(http.Client());
  final homePageModel = HomePageModel(weatherService);

  runApp(
    MyApp(model: homePageModel),
  );
}

class MyApp extends StatelessWidget {
  final HomePageModel model;

  const MyApp({Key? key, required this.model}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return ModelProvider(
      model: model,
      child: MaterialApp(
        title: 'Flutter Demo',
        theme: ThemeData.dark().copyWith(
          disabledColor: Colors.white12,
          primaryColor: Color(0xFF1C262A),
          scaffoldBackgroundColor: Color.fromRGBO(38, 50, 56, 1.0),
        ),
        home: HomePage(),
      ),
    );
  }
}
17
likes
130
pub points
81%
popularity

Publisher

unverified uploader

A package with stream based Flutter Widgets that facilitate an reactive programming style.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, rx_command

More

Packages that depend on rx_widgets