This file contains hidden or 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
[ | |
{ | |
"city": "Adana", | |
"name": "Bahçe?ehir Koleji", | |
"url": "https://twitter.com/zeydankaralar01/status/1622644817506205709?s=46&t=BPAhJVUaSEp-FhJyk7mw2A", | |
"validation_date": "08/02/2023", | |
"latitude": "37.0185766", | |
"longitude": "35.2510051" | |
}, | |
{ |
This file contains hidden or 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 GlobalException { | |
static Future<T?> make<T>(AsyncValueGetter<T?> onOperation) async { | |
try { | |
final response = await onOperation.call(); | |
if (response == null) { | |
throw Exception('$T data is null $response'); | |
} | |
return response; | |
} catch (e) { | |
//logger |
This file contains hidden or 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/material.dart'; | |
import 'package:kartal/kartal.dart'; | |
class AnimatedPageSwitch extends StatelessWidget { | |
const AnimatedPageSwitch( | |
{super.key, | |
required this.isPageLoaded, | |
required this.loaderChild, | |
required this.completedChild}); | |
final bool isPageLoaded; |
This file contains hidden or 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 BaseFirebaseModel<T> { | |
final String id; | |
final T? data; | |
BaseFirebaseModel({ | |
required this.id, | |
required this.data, | |
}); | |
} |
This file contains hidden or 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/material.dart'; | |
enum Durations { | |
low(Duration(milliseconds: 500)), | |
normal(Duration(seconds: 1)), | |
high(Duration(seconds: 3)); | |
final Duration value; | |
const Durations(this.value); |
This file contains hidden or 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
extension StringBoolExtension on String { | |
bool get isTrue => bool.fromEnvironment(this); | |
} |
This file contains hidden or 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:dio/dio.dart'; | |
enum QueryValues { | |
version, | |
platform, | |
page, | |
pageSize; | |
MapEntry<String, String> toEntry(String value) { | |
return MapEntry(name, value); |
This file contains hidden or 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:async/async.dart'; | |
class CancelableCustomOperation<T> { | |
CancelableOperation<T?>? _cancellableOperation; | |
final _delayTime = const Duration(milliseconds: 300); | |
final void Function(T value) onChanged; | |
T? data; | |
CancelableCustomOperation( | |
this.onChanged, { | |
this.data, |
This file contains hidden or 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
if [ "$1" = "force" ] | |
then | |
flutter packages pub run build_runner build --delete-conflicting-outputs | |
else | |
flutter packages pub run build_runner build | |
fi |
This file contains hidden or 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/material.dart'; | |
part 'module/home_appbar.dart'; | |
part 'module/home_body.dart'; | |
part 'module/home_bottom_bar.dart'; | |
class HomeView extends StatelessWidget { | |
const HomeView({super.key}); | |
@override |