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:async'; | |
import 'package:flutter/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter_localizations/flutter_localizations.dart'; | |
import 'package:intl/date_symbol_data_local.dart' as intl; | |
import 'package:intl/intl.dart' as intl; | |
class _PTBRMaterialLocalizationsDelegate | |
extends LocalizationsDelegate<MaterialLocalizations> { |
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:html' as html; | |
import 'package:uuid/uuid.dart'; | |
import 'package:image_picker_web/image_picker_web.dart'; | |
Future uploadImage() async { | |
var image = await ImagePicker().pickImage(source: ImageSource.gallery); | |
if (image != null) { | |
final metadata = SettableMetadata( |
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
@Pipe({name: 'cnpj'}) | |
export class CNPJPipe implements PipeTransform { | |
transform(value) { | |
return value.replace(/(\d{2})(\d{3})(\d{3})(\d{4})(\d{2})/g,"\$1.\$2.\$3\/\$4\-\$5") | |
} | |
} |
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:convert'; | |
import 'package:encrypt/encrypt.dart'; | |
import 'package:path_provider/path_provider.dart'; | |
import 'dart:async'; | |
import 'dart:io'; | |
class StorageUtil { | |
static Future<String> getLocalPath() async { |
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
public static void saveImage(Bitmap bitmapImage) { | |
File root = new File(Environment.getExternalStorageDirectory(), "Identidata"); | |
if (!root.exists()) { | |
root.mkdirs(); | |
} | |
File mypath = new File(root,"debug.jpg"); |
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
fun sendEmail(context: Context) { | |
val emailIntent = Intent(Intent.ACTION_SENDTO, Uri.fromParts( | |
"mailto", email@example.com, null)) | |
emailIntent.putExtra(Intent.EXTRA_SUBJECT, context.getString(R.string.label_subject_email)) | |
emailIntent.putExtra(Intent.EXTRA_TEXT, context.getString(R.string.label_email_description)) | |
startActivity(Intent.createChooser(emailIntent, context.getString(R.string.label_send_email)) | |
} |
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
class Util { | |
static bool isEmail(String email){ | |
return RegExp(r"^[a-zA-Z0-9.a-zA-Z0-9.!#$%&'*+-/=?^_`{|}~]+@[a-zA-Z0-9]+\.[a-zA-Z]+").hasMatch(email); | |
} | |
} |
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
<?xml version="1.0" encoding="utf-8"?> | |
<set xmlns:android="http://schemas.android.com/apk/res/android"> | |
<translate android:fromXDelta="-100%" android:toXDelta="0%" | |
android:fromYDelta="0%" android:toYDelta="0%" | |
android:duration="300"/> | |
</set> |
NewerOlder