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 MarkerHelper { | |
/// Create a marker from given parameter text into a marker | |
// Helper function to convert text into a BitmapDescriptor | |
static Future<BitmapDescriptor> _createCustomMarkerBitmap( | |
String text, double fontSize, double outlinewidth) async { | |
final double outlineWidth = 3.0; |
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 InAppUpdateProvider extends ChangeNotifier { | |
void checkUpdate() async { | |
try { | |
if (Platform.isAndroid) { | |
final checkUpdate = await InAppUpdate.checkForUpdate(); | |
if (checkUpdate.updateAvailability == | |
UpdateAvailability.updateAvailable) { | |
await InAppUpdate.performImmediateUpdate(); | |
} | |
} |
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 'dart:convert'; | |
import 'dart:developer'; | |
import 'dart:io'; | |
import 'package:path_provider/path_provider.dart'; | |
import '../../../log/app_logger.dart'; | |
import '../../../utils/mem_size_utils.dart'; | |
final _log = AppLogger().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 'dart:developer'; | |
import 'dart:io'; | |
import 'dart:typed_data'; | |
import 'package:camera/camera.dart'; | |
import 'package:path/path.dart' as path; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter_easyloading/flutter_easyloading.dart'; | |
import 'package:path_provider/path_provider.dart'; | |
import 'package:riverpod_annotation/riverpod_annotation.dart'; |
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:camera/camera.dart'; | |
import 'package:permission_handler/permission_handler.dart'; | |
import 'package:riverpod_annotation/riverpod_annotation.dart'; | |
/// Add this, path of generated riverpod file | |
part 'camera_provider.g.dart'; | |
@riverpod | |
Future<bool> cameraPermission(CameraPermissionRef ref) async { | |
List<Permission> permission; |
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'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({super.key}); | |
// This widget is the root of your application. |
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
void _showDialogExit() { | |
showDialog( | |
context: context, | |
builder: (BuildContext context) { | |
return AlertDialog( | |
title: Text('Exit App'), | |
content: Text('Do you want to exit this app?'), | |
actions: <Widget>[ | |
TextButton( | |
child: Text('No'), |
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 SimpleLog { | |
static final SimpleLog _singleton = SimpleLog._internal(); | |
late final Logger _logger; | |
factory SimpleLog() { | |
return _singleton; | |
} | |
SimpleLog._internal() { | |
_logger = Logger( |