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
| abstract class RichLogic { | |
| static String removeAllSpecialFormatting(String text) => text | |
| .replaceAll('*', '') | |
| .replaceAll('#', '') | |
| .replaceAll('[', '') | |
| .replaceAll(']', '') | |
| .replaceAll('{', '') | |
| .replaceAll('}', ''); |
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:awesome_notifications/awesome_notifications.dart'; | |
| abstract class AwesomeNotificationActions { | |
| /// Use this method to detect when a new notification or a schedule is created | |
| @pragma("vm:entry-point") | |
| static Future<void> onNotificationCreatedMethod( | |
| ReceivedNotification receivedNotification, | |
| ) async { | |
| // Your code goes here | |
| } |
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
| // The algorithm implemented is a mix of XOR cipher and Ceasar's cipher. | |
| // It can be seen that the algorithm is case-sensitive from the examples included. | |
| // | |
| // Instructions for usage: Copy this entire Gist to https://dartpad.dev/ and run it. | |
| // | |
| // Output: | |
| // ==================== | |
| // How are you doing, my king? | |
| // how are you doing, my king? | |
| // The faullt is not in our stars but in ourselves |
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}); | |
| @override |
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'; | |
| class MyApp extends StatelessWidget { | |
| const MyApp({super.key}); | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp( | |
| theme: ThemeData(brightness: Brightness.dark), | |
| title: 'Animations tutorial', |
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/services.dart'; | |
| /// Format: "dd/mm/yyyy" | |
| class DateInputFormatter extends TextInputFormatter { | |
| @override | |
| TextEditingValue formatEditUpdate( | |
| TextEditingValue oldValue, TextEditingValue newValue) { | |
| if (newValue.text.isEmpty) { | |
| return newValue; |
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:math'; | |
| import 'package:flutter/material.dart'; | |
| void main() { | |
| runApp( | |
| const MyApp(), | |
| ); | |
| } |
NewerOlder