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:cloud_firestore/cloud_firestore.dart'; | |
import 'package:flutter/foundation.dart'; | |
/// Base service class for handling CRUD operations with Firestore | |
abstract class BaseFirestoreService<T> { | |
/// Constructor | |
BaseFirestoreService(String collectionPath) { | |
_collection = _firestore.collection(collectionPath); | |
} |
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:flutter/scheduler.dart'; | |
import 'dart:math'; | |
import 'dart:async'; | |
import 'dart:ui' as ui; | |
import 'dart:typed_data'; | |
const bool kDebugMode = false; | |
const int kLaunchIntervalBaseMs = 400; |
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
typedef AsyncErrorRecord = ({Object error, StackTrace? stackTrace}); | |
abstract class Async<T> { | |
const Async(); | |
static Future<(AsyncErrorRecord? error, T? result)> guard<T>( | |
Future<T> Function() future, | |
) async { | |
try { | |
final result = await future(); |
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:ui' as ui; | |
import 'package:flutter/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { |
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 'dart:ui'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({super.key}); |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Quotation</title> | |
<style> | |
body { | |
font-family: Arial, sans-serif; | |
margin: 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
(function () { | |
const Selectors = { | |
COMMENTER_NAME: ".comments-comment-meta__description-title", | |
COMMENT_TEXT: ".comments-comment-item__main-content", | |
LIKES_COUNT: ".comments-comment-social-bar__reactions-count--cr span.v-align-middle", | |
REPLY_ELEMENTS: ":scope article.comments-comment-entity--reply", | |
TOP_LEVEL_COMMENTS: "article.comments-comment-entity:not(.comments-comment-entity--reply)", | |
LOAD_MORE_BUTTON: ".comments-comments-list__load-more-comments-button--cr", | |
}; |
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:flutter/rendering.dart'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatefulWidget { | |
const MyApp({super.key}); |
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:async'; | |
import 'package:collection/collection.dart'; | |
import 'package:flutter/gestures.dart'; | |
import 'package:flutter/material.dart'; | |
void main() { | |
runApp( | |
MaterialApp( | |
home: Scaffold( |
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 FirebaseErrorValidation { | |
const FirebaseErrorValidation._(); | |
/// default messages for firebase auth exceptions | |
static const Map<String, String> _kErrorMessages = { | |
'unknown': 'An unknown exception occurred.', | |
'invalid-email': 'Email is not valid or badly formatted.', | |
'user-disabled': | |
'This user has been disabled. Please contact support for help.', | |
'email-already-in-use': 'An account already exists for that email.', |
NewerOlder