step 11 : proses clock in, clock out
This commit is contained in:
4
lib/provider/current_check_jam_presensi_provider.dart
Normal file
4
lib/provider/current_check_jam_presensi_provider.dart
Normal file
@@ -0,0 +1,4 @@
|
||||
import 'package:absensi_sas_flutter/model/check_presensi_jam_model.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
final currentCheckJamPresensiProvider = StateProvider<CheckPresensiJamModel?>((ref) => null);
|
||||
3
lib/provider/current_menu_provider.dart
Normal file
3
lib/provider/current_menu_provider.dart
Normal file
@@ -0,0 +1,3 @@
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
final currentPageProvider = StateProvider<int?>((ref) => null);
|
||||
@@ -5,6 +5,9 @@ import '../app/constant.dart';
|
||||
|
||||
final graphqlProvider = Provider.family<GraphQLClient, String>(
|
||||
(_, token) {
|
||||
final policies = Policies(
|
||||
fetch: FetchPolicy.noCache,
|
||||
);
|
||||
return GraphQLClient(
|
||||
link: (token != "")
|
||||
? HttpLink(
|
||||
@@ -17,6 +20,11 @@ final graphqlProvider = Provider.family<GraphQLClient, String>(
|
||||
Constant.baseURLGraphQl,
|
||||
),
|
||||
cache: GraphQLCache(),
|
||||
defaultPolicies: DefaultPolicies(
|
||||
watchQuery: policies,
|
||||
query: policies,
|
||||
mutate: policies,
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user