This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:async'; | |
import 'package:flutter/material.dart'; | |
import 'package:google_maps_flutter/google_maps_flutter.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatefulWidget { | |
@override | |
_MyAppState createState() => _MyAppState(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar( | |
title: Text(widget.title), | |
), | |
body: new ListView.builder( | |
itemCount: 50, | |
itemBuilder: (BuildContext context, int index) { | |
return new GestureDetector( | |
child: new ListTile( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@override | |
Widget build(BuildContext context) { | |
return new Scaffold( | |
key: scaffoldKey, | |
appBar: new AppBar( | |
title: new Text( | |
"Gird view pull refresh", | |
style: TextStyle(color: Colors.white), | |
), | |
), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fetchData() async { | |
var _duration = new Duration(seconds: 2); | |
return new Timer(_duration, onResponse); | |
} | |
void onResponse() { | |
setState(() { | |
isLoading = !isLoading; | |
var arr = <int>[]; | |
for(int i = 0; i < 30 ;i++){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new GridView.builder( | |
itemCount: 5, | |
gridDelegate: | |
new SliverGridDelegateWithFixedCrossAxisCount( | |
crossAxisCount: 3), | |
itemBuilder: (BuildContext context, int index) { | |
return new GestureDetector( | |
child: new Card( | |
elevation: 5.0, | |
child: new Container( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new GridView.builder( | |
itemCount: no.of.items, | |
gridDelegate: | |
new SliverGridDelegateWithFixedCrossAxisCount( | |
crossAxisCount: GridViewRow), | |
itemBuilder: (BuildContext context, int index) {}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head></head> | |
<body> | |
<div id="root"></div> | |
<script src="https://unpkg.com/react@16/umd/react.production.min.js"></script> | |
<script src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script> | |
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script> |