25 lines
446 B
Dart
25 lines
446 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class MapProvider with ChangeNotifier {
|
|
bool _isInitialized = false;
|
|
String _error = '';
|
|
|
|
bool get isInitialized => _isInitialized;
|
|
String get error => _error;
|
|
|
|
void initialize() {
|
|
_isInitialized = true;
|
|
notifyListeners();
|
|
}
|
|
|
|
void handleError(String error) {
|
|
_error = error;
|
|
notifyListeners();
|
|
}
|
|
|
|
void clearError() {
|
|
_error = '';
|
|
notifyListeners();
|
|
}
|
|
}
|