This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AppInitializationWidget extends ConsumerWidget { | |
const AppInitializationWidget({super.key, required this.onLoaded}); | |
final WidgetBuilder onLoaded; | |
@override | |
Widget build(BuildContext ctx, WidgetRef ref) => CustomFutureBuilder( | |
futures: [ | |
Firebase.initializeApp(), | |
DataController.vehicleDB.getVehicleSpecification('type'), | |
DataController.vehicleDB.getVehicleSpecification('class'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Vehicult extends ConsumerWidget { | |
@override | |
Widget build(BuildContext ctx, WidgetRef ref) => CustomFutureBuilder( | |
future: DataController.fileDB.processSettingsFile(), | |
loading: RowLoading(), | |
onDone: (st) { | |
ref.read(settingsProvider).set(st.data); | |
return MaterialApp( | |
title: 'MyApp', | |
localizationsDelegates: AppLocalizations.localizationsDelegates, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyApp extends ConsumerWidget { | |
@override | |
Widget build(BuildContext ctx, WidgetRef ref) => | |
ref.watch(settingsAsyncProvider).when( | |
loading: () => RowLoading(), | |
error: (e, s) => CustomError(body: '$e \n \n $s'), | |
data: (data) { | |
return MaterialApp( | |
title: 'MyApp', | |
localizationsDelegates: AppLocalizations.localizationsDelegates, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:convert'; | |
void main() { | |
final stringifiedJson = '[{"id":"4","name":"Tulpenrallye 2022","location":"50.1213479,8.4964818","description":"Nog maar vijf weken geleden stonden wij aan de finish van de 67eTulpenrallye. Vandaag word jij door ons uitgenodigd voor 68e Tulpenrallye. Hiermee gaan wij een nieuw hoofdstuk toevoegen aan de lange Tulpenrallye geschiedenis. De 68e Tulpenrallye start op maandagochtend 9 mei 2022 in de buurt van Frankfurt in Duitsland. Na een overnachting in Karlsruhe gaat de rally daarna verder in het vertrouwde Frankrijk. Natuurlijk doen we ook Luxemburg en Belgi? aan in deze editie.","website":"tulpenrallye.nl","email":"rallyoffice@tulpenrallye.nl","phone":" +31 (0) 6 41291219","img":"https:\/\/www.tulpenrallye.nl\/wp-content\/uploads\/2021\/11\/VISUAL-2022-LR-1.jpg","vehicle_date_from":"1899-01-01","vehicle_date_to":"1973-01-01","vehicle_type_id":"1","user_id":null,"vehicle_region_id":"1","brand":null,"model":null,"event_id":"4","date":"2023-05-09","begin":"09:00:00","end" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Checkbox( | |
value: ref.watch(boolNr1.state).state, | |
onChanged: (value) { | |
ref.watch(boolNr1.state).state = value; | |
}, | |
), | |
Checkbox( | |
value: ref.watch(boolNr2.state).state, | |
onChanged: (value) { | |
ref.watch(boolNr2.state).state = value; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter_riverpod/flutter_riverpod.dart'; | |
import 'package:oldtimer_app/models/vehicle.dart'; | |
import 'package:oldtimer_app/services/database/controller_data.dart'; | |
final vehicleStateFuture = FutureProvider<List<Vehicle>>((ref) async { | |
return DataController.vehicleDB.getUserVehicles(someUID); | |
}, | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter_riverpod/flutter_riverpod.dart'; | |
final indexNotifier = StateNotifierProvider<IndexNotifier>((ref) { | |
return IndexNotifier(); | |
}); | |
class IndexNotifier extends StateNotifier<int> { | |
IndexNotifier() : super(0); | |
void changeIndex(int index) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main() | |
{ | |
som = 0; k = 4; | |
int pid, k, som; | |
pid = fork(); | |
if (pid == 0) | |
k = 5; | |
else | |
wait(0); | |
for (int i = 3; i <= k; i++) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public async Task<bool> PerformTextualInputAsync(string text) | |
{ | |
UIElement focusedControl = Keyboard.FocusedElement as UIElement; | |
if (focusedControl != null) | |
{ | |
text = text.ToUpper(System.Globalization.CultureInfo.CurrentCulture); | |
string[] textArray = text.ToCharArray().Select(c => c.ToString()).ToArray(); | |
if (Keyboard.PrimaryDevice.ActiveSource != null) |
NewerOlder