mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 22:09:06 +00:00
* flutter create * Copied in from 'contextual-menu-examples' repo * Works again with the latest updates to the branch * Clean up anywhere example * Clean up other examples * Add to CI * Updated with release version of context menus, and added platform switcher * Generated files * Home icon on your original platform * Remove web_dashboard from ci, not sure why that change was there... * Add context_menu to beta channel, but commented out, for the future * +x permissions on the master script, which I may have accidentally changed before? * Actual bash comment * dart format * Natural default platform' * A working test, for the email page * Import order fix * Test some pages * More tests * dart format
11 lines
254 B
Dart
11 lines
254 B
Dart
/// Returns true if the given String is a valid email address.
|
|
bool isValidEmail(String text) {
|
|
return RegExp(
|
|
r'(?<name>[a-zA-Z0-9]+)'
|
|
r'@'
|
|
r'(?<domain>[a-zA-Z0-9]+)'
|
|
r'\.'
|
|
r'(?<topLevelDomain>[a-zA-Z0-9]+)',
|
|
).hasMatch(text);
|
|
}
|