Skip to content

Instantly share code, notes, and snippets.

@viveky259259
Created November 21, 2019 10:08
Show Gist options
  • Save viveky259259/1c0b65b2e0d514eead0180e4c1284ea3 to your computer and use it in GitHub Desktop.
Save viveky259259/1c0b65b2e0d514eead0180e4c1284ea3 to your computer and use it in GitHub Desktop.
This is Hive example
import 'package:flutter/material.dart';
class HiveExampleUi extends StatefulWidget {
@override
_HiveExampleUiState createState() => _HiveExampleUiState();
}
class _HiveExampleUiState extends State<HiveExampleUi> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Hive example"),
),
body: Column(
children: <Widget>[
Row(
children: <Widget>[
FlatButton(
child: Text("Add item "),
onPressed: () {},
),
FlatButton(
child: Text("Delete item "),
onPressed: () {},
),
FlatButton(
child: Text("Update item "),
onPressed: () {},
),
FlatButton(
child: Text("Read item "),
onPressed: () {},
),
],
)
],
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment