48 lines
1.5 KiB
Dart
48 lines
1.5 KiB
Dart
import '/backend/api_requests/api_calls.dart';
|
|
import '/flutter_flow/flutter_flow_util.dart';
|
|
import '/flutter_flow/request_manager.dart';
|
|
|
|
import 'liberation_history_widget.dart' show LiberationHistoryWidget;
|
|
import 'package:flutter/material.dart';
|
|
|
|
class LiberationHistoryModel extends FlutterFlowModel<LiberationHistoryWidget> {
|
|
/// State fields for stateful widgets in this page.
|
|
|
|
final unfocusNode = FocusNode();
|
|
// State field(s) for TextField widget.
|
|
FocusNode? textFieldFocusNode;
|
|
TextEditingController? textController;
|
|
String? Function(BuildContext, String?)? textControllerValidator;
|
|
|
|
/// Query cache managers for this widget.
|
|
|
|
final _getLiberationsManager = FutureRequestManager<ApiCallResponse>();
|
|
Future<ApiCallResponse> getLiberations({
|
|
String? uniqueQueryKey,
|
|
bool? overrideCache,
|
|
required Future<ApiCallResponse> Function() requestFn,
|
|
}) =>
|
|
_getLiberationsManager.performRequest(
|
|
uniqueQueryKey: uniqueQueryKey,
|
|
overrideCache: overrideCache,
|
|
requestFn: requestFn,
|
|
);
|
|
void clearGetLiberationsCache() => _getLiberationsManager.clear();
|
|
void clearGetLiberationsCacheKey(String? uniqueKey) =>
|
|
_getLiberationsManager.clearRequest(uniqueKey);
|
|
|
|
@override
|
|
void initState(BuildContext context) {}
|
|
|
|
@override
|
|
void dispose() {
|
|
unfocusNode.dispose();
|
|
textFieldFocusNode?.dispose();
|
|
textController?.dispose();
|
|
|
|
/// Dispose query cache managers for this widget.
|
|
|
|
clearGetLiberationsCache();
|
|
}
|
|
}
|