Skip to content

Instantly share code, notes, and snippets.

View kumar-aakash86's full-sized avatar

Aakash Kumar kumar-aakash86

View GitHub Profile
@kumar-aakash86
kumar-aakash86 / main.dart
Created February 20, 2024 10:32
Animated canvas arrows - flutter
import 'package:flutter/material.dart';
// Animated canvas arrows
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@kumar-aakash86
kumar-aakash86 / main.dart
Created January 13, 2023 12:36
Flutter - Stack with listview
import 'package:flutter/material.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@kumar-aakash86
kumar-aakash86 / main.dart
Last active January 11, 2023 13:52
Flutter - Search using provider
// This code is distributed under the MIT License.
// Copyright (c) 2019 Remi Rousselet.
// You can find the original at https://github.com/rrousselGit/provider.
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:http/http.dart' as http;
import 'dart:convert' as convert;
@kumar-aakash86
kumar-aakash86 / main.dart
Created January 6, 2023 07:46
Flutter - Bottom Navigation Bar
import 'package:flutter/material.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@kumar-aakash86
kumar-aakash86 / main.dart
Created January 5, 2023 07:30
Flutter - Theme Toggle from Drawer
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(App());
}
class App extends StatelessWidget {
@kumar-aakash86
kumar-aakash86 / main.dart
Last active January 4, 2023 14:36
Flutter - StreamBuilder with setState
import 'package:flutter/material.dart';
import 'dart:async';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@kumar-aakash86
kumar-aakash86 / main.dart
Created January 28, 2022 15:22
Flutter Animated Dialog
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
import 'dart:async';
import 'package:flutter/gestures.dart';
void main() {
runApp(MyApp());
@kumar-aakash86
kumar-aakash86 / main.dart
Last active September 30, 2021 15:12
Updating child array as per parent
var json = {
"Accessories": [
{
"id": 1,
"brand": "samsung",
"parentId": null,
"children": [
{"id": 4, "name": "Ace", "parentId": 1},
{"id": 5, "name": "note", "parentId": 1},
{"id": 6, "name": "galaxy", "parentId": 1}
@kumar-aakash86
kumar-aakash86 / main.dart
Last active August 17, 2020 14:41
Login page sample
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// CODE FROM
// http://www.codeplayon.com/2020/02/simple-flutter-login-screen-ui-example/
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
@kumar-aakash86
kumar-aakash86 / main.dart
Last active September 10, 2020 04:18
Single Finger Widget Resize
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,