create media list view controller to handles media list view

This commit is contained in:
MateusHBR
2022-04-18 14:27:50 -03:00
parent b5e99e505d
commit 852f4b1ec5
2 changed files with 53 additions and 0 deletions
@@ -0,0 +1,16 @@
import 'package:flutter/material.dart';
/// Controller for MediaListView Widget
class MediaListViewController extends ChangeNotifier {
var _shouldUpdateMedia = false;
/// Getter that knows if the media should be updated.
bool get shouldUpdateMedia => _shouldUpdateMedia;
/// Method that update shouldUpdateMedia and notify all listeners
/// about this update.
void updateMedia({required bool newValue}) {
_shouldUpdateMedia = newValue;
notifyListeners();
}
}