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'; | |
void testMaskEmail() { | |
final emails = [ | |
'a@example.com', | |
// output: a****a@example.com | |
'ab@example.com', | |
// output: a****b@example.com | |
'abc@example.com', | |
// output: a****c@example.com |
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'; | |
import 'package:graphx/graphx.dart'; | |
import 'zoom_scene.dart'; | |
/// Live demo: | |
/// https://graphx-gesture-sample.surge.sh | |
/// | |
void main() { |
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
/// Copyright roipeker 2020. | |
// Web Sample: | |
// https://roi-getx-kill-dialog.surge.sh/ | |
import 'package:flutter/material.dart'; | |
import 'package:get/get.dart'; | |
/// proof of concept | |
/// execute in main.dart: |
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
/// roipeker - 2020 | |
/// Based on | |
/// https://medium.com/coding-with-flutter/flutter-case-study-multiple-navigators-with-bottomnavigationbar-90eb6caa6dbf | |
import 'package:flutter/material.dart'; | |
import 'package:get/get.dart'; | |
class SampleMultiNavColors 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
////////////////////////////// | |
// | |
// 2019, roipeker.com | |
// screencast - demo simple image: | |
// https://youtu.be/EJyRH4_pY8I | |
// | |
// screencast - demo snapshot: | |
// https://youtu.be/-LxPcL7T61E | |
// | |
////////////////////////////// |
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
/// copyright 2020, roipeker | |
class FormValidations { | |
static String email(String val) { | |
val = val.trim(); | |
if (val.isEmpty) return 'Email cant be empty'; | |
if (val.length <= 4) return 'Email is too short'; | |
if (!val.isEmail) return 'Invalid email'; | |
return null; | |
} |
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
/// roipeker 2020. | |
import 'dart:ui'; | |
import 'package:flutter/rendering.dart'; | |
import 'package:flutter/widgets.dart'; | |
/// Usage: | |
/// ``` | |
/// GlassBox( | |
/// width: 140, |
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
/// Note: | |
/// A simple fix for this case scenario of local controller lifecycle, might be | |
/// to separate the `global:false` logic here: | |
/// https://github.com/jonataslaw/getx/blob/07ad5d7f9e726f181800359d0218b44e5967ccf8/lib/get_state_manager/src/simple/get_state.dart#L177 | |
// ... | |
// if (_isCreator! || widget.assignId) { | |
// if (widget.autoRemove) { | |
// /// if the Controller is flagged as "local", run manually `onClose()`. | |
// if( !widget.global ){ |
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
/// roipeker 2023. | |
/// | |
/// #short tutorial: https://youtu.be/I8Yo9jq4hXs | |
/// | |
import 'package:flutter/material.dart'; | |
import 'package:graphx/graphx.dart'; | |
void main() { | |
runApp(const MyApp()); |
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/cupertino.dart'; | |
abstract class Entity { | |
late final onDispose = Signal0(); | |
late bool _disposed = false; | |
bool get disposed => _disposed; | |
@mustCallSuper |
NewerOlder