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 / App.js
Last active June 2, 2020 07:34
Setting up React Native with Redux
import store from "./store/store";
import { Provider } from "react-redux";
export default class App extends React.Component {
render() {
return (
<View style={{ flex: 1 }}>
<StatusBar
backgroundColor={theme.PRIMARY_COLOR}
barStyle="light-content"/>
@kumar-aakash86
kumar-aakash86 / HtmlCustomizer.java
Last active December 15, 2018 15:05
Customizing html string with your custom html tags in Android
package r.systems.demo1.utils;
import android.util.Log;
// jsoup library is required for this
// implementation 'org.jsoup:jsoup:1.11.3'
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
@kumar-aakash86
kumar-aakash86 / main.dart
Last active September 15, 2019 07:19
Render UI with delay
import 'package:flutter_web/material.dart';
import 'package:flutter_web_ui/ui.dart' as ui;
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Demo',
home: Scaffold(
appBar: AppBar(
@kumar-aakash86
kumar-aakash86 / main.dart
Created September 15, 2019 08:20
AnimationOpacity Example
import 'package:flutter_web/material.dart';
import 'package:flutter_web_ui/ui.dart' as ui;
class MyHomePage extends StatefulWidget {
@override
_MyHomePageState createState() => new _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
List<Item> items;
@kumar-aakash86
kumar-aakash86 / main.dart
Created September 15, 2019 08:22
AnimationOpacity Example
import 'package:flutter_web/material.dart';
import 'package:flutter_web_ui/ui.dart' as ui;
class MyHomePage extends StatefulWidget {
@override
_MyHomePageState createState() => new _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
List<Item> items;
@kumar-aakash86
kumar-aakash86 / main.dart
Last active July 8, 2020 16:24
Rotate With Handler
import 'dart:math';
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@kumar-aakash86
kumar-aakash86 / main.dart
Last active July 28, 2020 14:42
Dart Generate Function
void main() {
List<int> numberList = List<int>.generate(10, (i) => i+1);
numberList.forEach(print);
}
@kumar-aakash86
kumar-aakash86 / main.dart
Last active July 28, 2020 14:43
Dart Generate Function - Random Numbers
// Copyright 2015 the Dart project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file.
import 'dart:math';
void main() {
var random = Random();
List<int> numberList = List<int>.generate(10, (i) => random.nextInt(100));
@kumar-aakash86
kumar-aakash86 / main.dart
Last active July 28, 2020 14:48
Dart Generate Function - Custom Class
void main() {
List<Product> numberList = List<Product>.generate(10, (i) => Product("Product $i"));
numberList.forEach(print);
}
class Product{
String title;
Product(this.title);
@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,