123456789101112131415161718192021222324252627282930313233 |
- import 'package:flutter/material.dart';
- import 'package:video/model/video.dart';
- class UrlInfo with ChangeNotifier {
- int _urlIndex = -1;
- String _url = "";
- Video _video = Video();
- bool _isAdd = false;
- int _change = 0;
- String get url => _url;
- int get urlIndex => _urlIndex;
- Video get video => _video;
- bool get isAdd => _isAdd;
- int get change => _change;
- changIndex(int currIndex) {
- _urlIndex = currIndex;
- notifyListeners();
- }
- changUrl(String url) {
- _url = url;
- notifyListeners();
- }
- changVideo(Video video, bool isAdd) {
- _video = video;
- _isAdd = isAdd;
- _change = _change + 1;
- notifyListeners();
- }
- }
|