Skip to content

Instantly share code, notes, and snippets.

View ashutoshsr7's full-sized avatar

Ashutosh ashutoshsr7

View GitHub Profile
@ashutoshsr7
ashutoshsr7 / main.dart
Created October 3, 2024 12:45
Flutter Radio Widget Tutorial
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
static const String _title = 'Flutter Tutorial';
@override
@ashutoshsr7
ashutoshsr7 / main.dart
Created June 7, 2024 08:12
AnimatedContainer
import 'dart:math';
import 'package:flutter/material.dart';
void main() => runApp(const AnimatedContainerApp());
class AnimatedContainerApp extends StatefulWidget {
const AnimatedContainerApp({super.key});
@override
@ashutoshsr7
ashutoshsr7 / main.dart
Created June 6, 2024 11:03
Shared Element Transitions
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Shared Element Transition',
home: GridScreen(),
@ashutoshsr7
ashutoshsr7 / main.dart
Last active June 6, 2024 09:59
Hero Animation Example
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@ashutoshsr7
ashutoshsr7 / main.dart
Created June 5, 2024 05:47
Combining TweenSequence and Interval
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
@ashutoshsr7
ashutoshsr7 / main.dart
Created May 30, 2024 10:43
Alien UFO - Custom Animations
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: MyHomePage(),
@ashutoshsr7
ashutoshsr7 / main.dart
Created May 28, 2024 12:33
StraggerAnimation
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart' show timeDilation;
class StaggerAnimation extends StatelessWidget {
StaggerAnimation({super.key, required this.controller})
:
// Each animation defined here transforms its value during the subset
@ashutoshsr7
ashutoshsr7 / main.dart
Created May 28, 2024 12:06
Using Interval
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: IntervalDemo(),
);
@ashutoshsr7
ashutoshsr7 / main.dart
Created May 28, 2024 11:58
TweenSequence
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: TweenSequenceDemo(),
);
@ashutoshsr7
ashutoshsr7 / main.dart
Last active May 27, 2024 13:08
Flutter- Explicit Animations
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: MyAnimationWidget(),
);