You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			33 lines
		
	
	
		
			576 B
		
	
	
	
		
			Dart
		
	
			
		
		
	
	
			33 lines
		
	
	
		
			576 B
		
	
	
	
		
			Dart
		
	
import 'package:flutter/material.dart';
 | 
						|
import 'package:test_sa/models/base.dart';
 | 
						|
 | 
						|
class NullableLoadingProvider extends LoadingListNotifier<Base> {
 | 
						|
  @override
 | 
						|
  Future getDate() {
 | 
						|
    return Future.value();
 | 
						|
  }
 | 
						|
}
 | 
						|
 | 
						|
abstract class LoadingListNotifier<T extends Base> extends ChangeNotifier {
 | 
						|
  int? stateCode;
 | 
						|
 | 
						|
  List<T> items = [];
 | 
						|
 | 
						|
  bool _loading = false;
 | 
						|
 | 
						|
  bool get loading => _loading;
 | 
						|
 | 
						|
  set loading(bool value) {
 | 
						|
    _loading = value;
 | 
						|
    notifyListeners();
 | 
						|
  }
 | 
						|
 | 
						|
  void reset() {
 | 
						|
    items = [];
 | 
						|
    _loading = false;
 | 
						|
    stateCode = null;
 | 
						|
  }
 | 
						|
 | 
						|
  Future getDate();
 | 
						|
}
 |