For example, you want to set 40% alpha transparence to #000000
(black color), you need to add 66
like this #66000000
.
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 '/features/architecture/logging.dart'; | |
class CachedQuery<T> { | |
final Duration invalidation; | |
final Future<T> Function(String key) fn; | |
CachedQuery( | |
this.fn, | |
this.invalidation, | |
); |
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
// Convert string to number | |
type ToNumber<S> = S extends `${infer N extends number}` ? N : never; | |
// Creates an array with a particular length | |
type ArrayWithLength< | |
T extends number, | |
A extends number[] = number[], | |
> = A["length"] extends T ? A : ArrayWithLength<T, [...A, A["length"]]>; | |
// Generates a union type with all the numbers from zero -> n |
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/material.dart'; | |
const Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatefulWidget { | |
@override |
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:math'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override |
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:math'; | |
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({Key? key}) : super(key: key); |
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/rendering.dart'; | |
import 'package:flutter/widgets.dart'; | |
class Space extends LeafRenderObjectWidget { | |
const Space(this.space, {Key? key}) : super(key: key); | |
final double space; | |
@override | |
RenderObject createRenderObject(BuildContext context) => RenderSpace(space: space); |
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
{ | |
"9 payment service Bank": "120001", | |
"AB MICROFINANCE BANK": "090270", | |
"ABBEY MORTGAGE BANK": "070010", | |
"ABOVE ONLY MICROFINANCE BANK": "090260", | |
"ABU MICROFINANCE BANK": "090197", | |
"ACCESS BANK": "000014", | |
"ACCESSMONEY": "100013", | |
"ACCION MFB": "090134", | |
"ADDOSSER MFBB": "090160", |
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
// Error Codes for SignUp | |
ERROR_OPERATION_NOT_ALLOWED` - Indicates that Anonymous accounts are not enabled. | |
ERROR_WEAK_PASSWORD - If the password is not strong enough. | |
ERROR_INVALID_EMAIL` - If the email address is malformed. | |
ERROR_EMAIL_ALREADY_IN_USE - If the email is already in use by a different account. | |
ERROR_INVALID_CREDENTIAL` - If the [email] address is malformed. | |
// sending password reset email | |
ERROR_INVALID_EMAIL` - If the [email] address is malformed. |
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
Below are the Big O performance of common functions of different Java Collections. | |
List | Add | Remove | Get | Contains | Next | Data Structure | |
---------------------|------|--------|------|----------|------|--------------- | |
ArrayList | O(1) | O(n) | O(1) | O(n) | O(1) | Array | |
LinkedList | O(1) | O(1) | O(n) | O(n) | O(1) | Linked List | |
CopyOnWriteArrayList | O(n) | O(n) | O(1) | O(n) | O(1) | Array | |
NewerOlder