Skip to content

Instantly share code, notes, and snippets.

View IshanFx's full-sized avatar
🏆
Focusing

Ishan Fernando IshanFx

🏆
Focusing
View GitHub Profile
@IshanFx
IshanFx / circleimage.dart
Last active April 3, 2019 07:01
Flutter circle image
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: 'Flutter Demo',
@IshanFx
IshanFx / circleimage.dart
Created August 4, 2018 07:43
Flutter circle view
class CircleWidgets extends State<CircleImages>{
@override
Widget build(BuildContext context) {
List<Widget> widgets = [];
for(var x = 0 ; x < 10 ; x++){
widgets.add(Container(
height: 60.0,
width: 60.0,
margin: EdgeInsets.all(
6.0
@IshanFx
IshanFx / horizontalscroll.dart
Created August 4, 2018 07:50
Flutter Horizontal scrollview
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: 'Flutter Demo',
@IshanFx
IshanFx / swipedeletewithouticons.dart
Last active August 18, 2018 04:40
Swipe to delete without icons
class SwipeWidget extends State<SwipeList> {
List items = getDummyList();
@override
Widget build(BuildContext context) {
return Container(
child: ListView.builder(
itemCount: items.length,
itemBuilder: (context, index) {
return Dismissible(
@IshanFx
IshanFx / swipetodelete.dart
Created September 1, 2018 08:32
Swipe to dismiss for flutter
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(
debugShowCheckedModeBanner: false,
class _MyHomePageState extends State<MyHomePage> {
int _cIndex = 0;
void _incrementTab(index) {
setState(() {
_cIndex = index;
});
}
@override
@IshanFx
IshanFx / BottomNavigationWithFloatButton.dart
Created October 18, 2018 16:24
Bottom navigation bar with floating button in Flutter
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: 'Flutter Floating',
@IshanFx
IshanFx / bottomsheet.dart
Last active November 11, 2018 06:59
Flutter bottom sheet
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',
@IshanFx
IshanFx / rhinoscript.java
Last active December 16, 2018 07:48
Rhino JS executer for android
public static String runScript(Context androidContextObject) {
// Get the JavaScript in previous section
try {
Resources resources = androidContextObject.getResources();
InputStream rawResource = resources.openRawResource(R.raw.config);
Properties properties = new Properties();
properties.load(rawResource);
@IshanFx
IshanFx / herofirstpage.dart
Created January 3, 2019 15:52
Hero Animation first page
import 'package:flutter/material.dart';
import 'Second.dart';
void main() => runApp(FlutterAni());
class FlutterAni extends StatelessWidget{
@override
Widget build(BuildContext context) {
// TODO: implement build