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
Configure login Apple ID | |
Prerequisites | |
Before you can start integrating (or even testing) Sign in with Apple you need a paid membership to the Apple Developer Program. Sign in with Apple is one of the restricted services which is not available for free with just an Apple ID (source). | |
Setup | |
Register an App ID | |
If you have not one yet, create a new one at https://developer.apple.com/account/resources/identifiers/list/bundleId following these steps: | |
Click “Register an App ID” | |
In the wizard select “App IDs”, click “Continue” |
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:developer' as devtools show log; | |
import 'package:flutter/foundation.dart'; | |
// call log on string and pass StackTrace if want file Name --> "here is log message".log(); | |
/// Extension on Object to enable conditional logging in debug mode. | |
extension Log on Object { | |
void log() { | |
if (kDebugMode) { |
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
1-Install Google Chrome | |
2- Install Java JDK using offline Installer | |
3- Install VSCODE and extension for Flutter and Dart | |
4- Install Android Studio and install Plugin for Dart and Flutter | |
5- Set up Global path for Flutter | |
type below command in cmd | |
sudo nano $HOME/.zshrc | |
past belwo | |
export PATH="$PATH:/Users/javeedishaq/flutter/bin" | |
ctrl+x to close type y to accept |
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'; | |
const Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp 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
// https://gist.github.com/Esgrima/c0d4bff4b0d3909daf8994410cd659ce | |
// https://dartpad.dev/c0d4bff4b0d3909daf8994410cd659ce | |
import 'package:flutter/material.dart'; | |
import 'package:flutter_test/flutter_test.dart'; | |
import 'package:boolean_selector/boolean_selector.dart'; | |
// (TODO: Tip # 1) Consider making frequently used variables/values constants | |
const _fooConst1 = ''; | |
const _fooConst2 = ''; |
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
Step 1: Download the JDK | |
# wget https://download.oracle.com/otn/java/jdk/8u291-b10/d7fc238d0cbf4b0dac67be84580cfb4b/jdk-8u311-linux-x64.tar.gz | |
# wget https://download.oracle.com/otn/java/jdk/11.0.15.1+2/d76aabb62f1c47aa8588b9ae5a8a5b46/jdk-11.0.15.1_linux-x64_bin.tar.gz | |
Step 2: Extract JDK and mpve to Java's default location | |
sudo tar -xvzf jdk-8u311-linux-x64.tar.gz | |
sudo mkdir /usr/lib/jvm | |
sudo mv jdk-11.0.15.1/ /usr/lib/jvm/ |
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'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Elevated Button', | |
home: FlutterExample(), |
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'; | |
const Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp 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
class ContactBook { | |
ContactBook._sharedInstance(); | |
static final ContactBook _shared = ContactBook._sharedInstance(); | |
factory ContactBook() => _shared; | |
} |
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 LoginApi implements LoginApiProtocol { | |
const LoginApi._sharedInstance(); | |
static const LoginApi _shared = LoginApi._sharedInstance(); | |
factory LoginApi.instance() => _shared; | |
@override | |
Future<LoginHandle?> login( | |
{required String email, required String password}) { |
NewerOlder