fr_mvvm_env 2.0.1 copy "fr_mvvm_env: ^2.0.1" to clipboard
fr_mvvm_env: ^2.0.1 copied to clipboard

Environment switching helpers for FlowR MVVM Flutter apps, including a view model contract and dropdown UI for dev/staging/prod state.

example/lib/main.dart

import 'package:flowr/flowr_mvvm.dart';
import 'package:flutter/material.dart';
import 'package:fr_mvvm_env/fr_mvvm_env.dart';

class YourEnvViewModel extends FrEnvViewModel {
  YourEnvViewModel()
    : super(
        const EnvModel(env: 'Development'),
        all: [
          const EnvModel(env: 'Development'),
          const EnvModel(env: 'Staging'),
          const EnvModel(env: 'Production'),
        ],
      );
}

void main() {
  runApp(
    FrProvider(
      (context) => YourEnvViewModel(),
      child: const MaterialApp(
        home: Scaffold(
          body: Center(child: FrEnvDropdownView<YourEnvViewModel, EnvModel>()),
        ),
      ),
    ),
  );
}
0
likes
160
points
91
downloads

Documentation

API reference

Publisher

verified publisherwyattcoder.top

Weekly Downloads

Environment switching helpers for FlowR MVVM Flutter apps, including a view model contract and dropdown UI for dev/staging/prod state.

Repository (GitHub)
View/report issues

Topics

#flowr #environment

License

MIT (license)

Dependencies

flowr, flutter

More

Packages that depend on fr_mvvm_env