Skip to content

Instantly share code, notes, and snippets.

@becek2n
Created May 8, 2020 14:29
Show Gist options
  • Save becek2n/d8a12c99f789b3db90d105a3dc9c066a to your computer and use it in GitHub Desktop.
Save becek2n/d8a12c99f789b3db90d105a3dc9c066a to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
import 'package:listview_bind_api/AttendanceScreen.dart';
import 'package:listview_bind_api/attendanceModel.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: MyHomePage(title: 'Flutter Demo List View Bind API'),
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);
final String title;
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
List<AttendanceModel> _attendances = <AttendanceModel>[];
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: AttendanceScreen(),
floatingActionButton: FloatingActionButton(
onPressed: null,
tooltip: 'Increment',
child: Icon(Icons.add),
), // This trailing comma makes auto-formatting nicer for build methods.
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment