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
# -*- coding: utf-8 -*- | |
from google.cloud import translate | |
import six | |
import xml.dom.minidom as minidom | |
def translate_text(target, text): | |
"""Translates text into the target language. | |
Target must be an ISO 639-1 language code. |
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
<html> | |
<head> | |
<title> | |
Hello sunny | |
</title> | |
</head> | |
</html> |
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
== Building for Android == | |
== /usr/local/bin/flutter build appbundle --release --build-name=1.0.25 --build-number=25 -v == | |
[ +53 ms] executing: [/Users/builder/programs/flutter/] git log -n 1 --pretty=format:%H | |
[ +58 ms] Exit code 0 from: git log -n 1 --pretty=format:%H | |
[ ] 20e59316b8b8474554b38493b8ca888794b0234a | |
[ ] executing: [/Users/builder/programs/flutter/] git describe --match v*.*.* --first-parent --long --tags | |
[ +22 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long --tags | |
[ ] v1.7.8+hotfix.4-0-g20e59316b | |
[ +19 ms] executing: [/Users/builder/programs/flutter/] git rev-parse --abbrev-ref --symbolic @{u} |
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(MyApp()); | |
class MyApp extends StatefulWidget { | |
@override | |
_MyAppState createState() => _MyAppState(); | |
} | |
class _MyAppState extends State<MyApp> { |
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:typed_data'; | |
import 'package:dio/dio.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:image_gallery_saver/image_gallery_saver.dart'; | |
import 'package:permission_handler/permission_handler.dart'; | |
//iOS - add these keys to info.plist in your ios folder | |
// NSPhotoLibraryAddUsageDescription and NSPhotoLibraryUsageDescription | |
// This gist uses flutter packages |
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
Future<User> signInWithGoogle() async { | |
final googleSignIn = GoogleSignIn(); | |
final googleAccount = await googleSignIn.signIn(); | |
if (googleAccount != null) { | |
final googleAuth = await googleAccount.authentication; | |
if (googleAuth.accessToken != null && googleAuth.idToken != null) { | |
final authResult = await _firebaseAuth.signInWithCredential( | |
GoogleAuthProvider.getCredential( | |
idToken: googleAuth.idToken, | |
accessToken: googleAuth.accessToken, |
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(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Flutter Demo', | |
debugShowCheckedModeBanner: false, |
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( | |
MaterialApp( | |
home: Scaffold( | |
appBar: AppBar( | |
title: Text("Profile page"), | |
), | |
body: Column( |
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(MaterialApp( | |
home: Page1(), | |
)); | |
} | |
class Page1 extends StatelessWidget { | |
TextEditingController usernameController = TextEditingController(); |
OlderNewer