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
name: Android UI Tests To FirebaseTestLab | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
android_test: |
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
include: package:very_good_analysis/analysis_options.yaml | |
analyzer: | |
exclude: | |
- lib/product/init/language/ | |
- lib/product/init/generation/ | |
- "/*.g.dart" | |
- "/*.gen.dart" | |
- "/*.freezed.dart" | |
- app_router.g.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
extension TestSafety<T> on Future<T> { | |
/// This method is used to safely run a future and return a nullable value. | |
/// If the future throws an error, it will be caught and logged. | |
Future<T?> safe() async { | |
try { | |
return await this; | |
} catch (e) { | |
CustomLogger.showError(e); | |
return null; | |
} |
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
# This file was auto-generated by the Firebase CLI | |
# https://github.com/firebase/firebase-tools | |
name: Deploy to Firebase Hosting on PR | |
on: | |
pull_request: | |
branches: | |
- release | |
types: [closed] |
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:envied/envied.dart'; | |
import 'package:gen/src/environment/app_configuration.dart'; | |
part 'prod_env.g.dart'; | |
@Envied(path: 'assets/env/.prod.env', obfuscate: true) | |
/// Production environment variables | |
final class ProdEnv implements AppConfiguration { | |
@EnviedField(varName: 'BASE_URL') |
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
targets: | |
$default: | |
builders: | |
auto_route_generator:auto_route_generator: # this for @RoutePage | |
generate_for: | |
- lib/**/**_view.dart | |
auto_route_generator:auto_router_generator: # this for @AutoRouterConfig | |
generate_for: | |
- lib/product/navigation/app_router.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
curl --request POST \ | |
--url 'http://localhost:3002/v1/projects/PROJECT_NAME/databases/(default)/documents/COLLECTION_NAME' \ | |
--header 'Content-Type: application/json' \ | |
--data '{ | |
"fields": { | |
"address": { | |
"stringValue": "Örnek Mahallesi Test Sokak Numara 123" | |
}, | |
"createdAt": { | |
"timestampValue": "2023-08-15T10:30:25Z" |
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
/// Show success snack bar | |
/// Message: [LocaleKeys.message_saveOnSuccess] | |
final class SuccessSnackBar extends SnackBar { | |
SuccessSnackBar({super.key}) | |
: super(content: Text(LocaleKeys.message_saveOnSuccess.tr())); | |
static void show(BuildContext context) { | |
ScaffoldMessenger.of(context).showSnackBar( | |
SuccessSnackBar(), | |
); |
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/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
class User { | |
final String? name; | |
final int? age; | |
const User(this.name, this.age); | |
bool isEmpty() { |
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 NumberExtension on num { | |
/// This method is used to take the first [count] digits of the number. | |
/// | |
/// if the number is 59342394234 and [count] is 2, the result will be 59. | |
/// number less than [count] will return 0. | |
num takeDigits(int count) { | |
final value = toString(); | |
final isValueLengthValid = value.length >= count; | |
if (!isValueLengthValid) return 0; | |
return num.parse(value.substring(0, count)); |
NewerOlder