Skip to content

Instantly share code, notes, and snippets.

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

Bhavik Makwana ibhavikmakwana

🏠
Working from home
View GitHub Profile
import android.util.Log;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
@ibhavikmakwana
ibhavikmakwana / UpdateFork.md
Last active April 11, 2018 12:55
Use for forked to be updated with the latest Code

Update your fork

  1. git remote add upstream <Remote Repo Url>

  2. git fetch upstream

  3. git checkout master

  4. git rebase upstream/master

import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'AnimatedSize',
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Flutter Demo',
theme: new ThemeData(
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'AnimatedSize',
@ibhavikmakwana
ibhavikmakwana / Main.Dart
Created May 28, 2018 06:42
AnimatedSize
new AnimatedSize(
curve: Curves.bounceInOut,
child: new GestureDetector(
onTap: () {
setState(() {
if (_resized) {
_resized = false;
_color = Colors.blue;
_height = 80.0;
_width = 80.0;
new MaterialButton(
child: setUpButtonChild(),
onPressed: null,
elevation: 4.0,
color: Colors.lightGreen,
)
Widget setUpButtonChild() {
return new Text(
"Click Here",
style: const TextStyle(
child: new MaterialButton(
child: setUpButtonChild(),
onPressed: () {
setState(() {
if (_state == 0) {
animateButton();
}
});
},
elevation: 4.0,
void animateButton() {
setState(() {
_state = 1;
});
Timer(Duration(milliseconds: 3300), () {
setState(() {
_state = 2;
});
});
Widget setUpButtonChild() {
if (_state == 0) {
return new Text(
"Click Here",
style: const TextStyle(
color: Colors.white,
fontSize: 16.0,
),
);
} else if (_state == 1) {