Skip to content

Instantly share code, notes, and snippets.

@rvdsoft
rvdsoft / view_model_example.dart
Last active March 5, 2020 14:16
Passing parameters between screens + initialising the view model
import 'package:flutter/material.dart';
import 'package:meta/meta.dart';
import 'package:provider/provider.dart';
abstract class ViewModel implements ChangeNotifier {
Future<void> initState();
}
abstract class BaseViewModel with ChangeNotifier implements ViewModel {
bool _isDisposed = false;