Skip to content

Instantly share code, notes, and snippets.

View prasadsunny1's full-sized avatar
🏠
Working from home

sanni prasad prasadsunny1

🏠
Working from home
View GitHub Profile
@prasadsunny1
prasadsunny1 / Fastfile
Created June 3, 2022 06:23 — forked from lukepighetti/Fastfile
How I build and release Flutter side projects on iOS https://twitter.com/luke_pighetti/status/1530156415611969537
default_platform(:ios)
APPLE_ISSUER_ID = ENV["APPLE_ISSUER_ID"]
APPLE_KEY_CONTENT = ENV["APPLE_KEY_CONTENT"]
APPLE_KEY_ID = ENV["APPLE_KEY_ID"]
DEVELOPER_APP_ID = ENV["DEVELOPER_APP_ID"]
DEVELOPER_APP_IDENTIFIER = ENV["DEVELOPER_APP_IDENTIFIER"]
GIT_AUTHORIZATION = ENV["GIT_AUTHORIZATION"]
GITHUB_RUN_NUMBER = ENV["GITHUB_RUN_NUMBER"]
PROVISIONING_PROFILE_SPECIFIER = ENV["PROVISIONING_PROFILE_SPECIFIER"]
<!--[if gte mso 9]><xml><o:OfficeDocumentSettings><o:AllowPNG/><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml><![endif]-->
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta content="width=device-width" name="viewport">
<!--[if !mso]><!-->
<meta content="IE=edge" http-equiv="X-UA-Compatible">
<!--<![endif]-->
<title></title>
class RPSCustomPainter extends CustomPainter {
@override
void paint(Canvas canvas, Size size) {
Paint paint = new Paint()
..color = Colors.blue
..style = PaintingStyle.stroke;
// Code for path
// From here ....
Path path = Path();
path.moveTo(size.width * 0.07, size.height * 0.08);
child: CustomPaint(
size: Size(150,250), //You can Replace this with your desired WIDTH and HEIGHT
painter: RPSCustomPainter(),
),
class RPSCustomPainter extends CustomPainter{
@override
void paint(Canvas canvas, Size size) {
Paint paint = new Paint()
@prasadsunny1
prasadsunny1 / ieee_validate_input.dart
Last active May 17, 2020 09:59
Validate the input
import 'dart:async';
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(
home: Page1(),
));
}
@prasadsunny1
prasadsunny1 / ieee_input.dart
Last active May 17, 2020 09:37
Take an input from user
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(
home: Page1(),
));
}
class Page1 extends StatelessWidget {
TextEditingController usernameController = TextEditingController();
@prasadsunny1
prasadsunny1 / ieee_navigation.dart
Last active May 17, 2020 09:40
Navigate from one page to another
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
home: Page1(),
),
);
}
@prasadsunny1
prasadsunny1 / main.dart
Created May 16, 2020 12:59
Milestone 1
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text("Profile page"),
),
body: Column(
@prasadsunny1
prasadsunny1 / main.dart
Created May 16, 2020 10:50 — forked from iamriya/main.dart
Profile screen demo
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,
@prasadsunny1
prasadsunny1 / googlesignin.dart
Created March 8, 2020 18:32
Google signin using flirebase in flutter
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,