A new Flutter application taking over your decisions for the next meal.
v411e / cookio Goto Github PK
View Code? Open in Web Editor NEWA new Flutter application taking over your decisions for the next meal.
A new Flutter application taking over your decisions for the next meal.
The app needs icons or small pictograms for each product. (For shoppinglist and storage overview) Ideas and inspiration can be taken from "Bring! Shoppinglist". A uniform appearance needs to be preferred.
Especially on the single item scroll view in the draggable scrollable sheet
This saves screen space. Possible implementation: pull_to_reveal
import 'dart:math';
import 'package:pull_to_reveal/pull_to_reveal.dart';
import 'package:flutter/material.dart';
class Reveal extends StatefulWidget {
final String title;
final bool revealWhenEmpty;
Reveal({Key key, this.revealWhenEmpty = true, this.title}) : super(key: key);
@override
_RevealState createState() => _RevealState();
}
class _RevealState extends State<Reveal> {
int _counter = 0;
String _filter;
List<String> items = [];
TextEditingController searchController;
void initState() {
searchController = TextEditingController();
searchController.addListener(_onSearch);
super.initState();
}
void _onSearch() {
setState(() {
_filter = searchController.text;
});
}
void addToList() {
setState(() {
_counter++;
items.add(names[Random.secure().nextInt(names.length - 1)]);
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: PullToRevealTopItemList(
revealWhenEmpty: widget.revealWhenEmpty,
itemCount: _counter,
revealableHeight: 50,
itemBuilder: (BuildContext context, int index) {
if (_filter != null && !items[index].contains(_filter)) {
return Container();
}
return Card(
margin: EdgeInsets.all(10),
child: Center(
child: Container(
height: 150,
padding: EdgeInsets.all(10),
child: Center(
child: Text('${items[index]}', key: Key('$index'), style: TextStyle(fontSize: 20)),
),
),
),
);
},
dividerBuilder: (BuildContext context) {
return Container(
alignment: Alignment.topLeft,
padding: EdgeInsets.all(10),
child: Text('Items', style: Theme.of(context).textTheme.headline),
);
},
revealableBuilder: (BuildContext context, RevealableToggler opener, RevealableToggler closer, BoxConstraints constraints) {
return Row(
key: Key('scrollable-row'),
children: <Widget>[
SizedBox(width: 10),
Flexible(
child: TextFormField(
controller: searchController,
decoration: InputDecoration(
hintText: 'Search',
suffixIcon: Icon(Icons.search, color: Theme.of(context).backgroundColor),
),
),
),
IconButton(
icon: Icon(Icons.cancel),
onPressed: () {
// Handles closing the `Revealable`
closer(completer: RevealableCompleter.snap);
// Removes any filtering effects
searchController.text = '';
setState(() {
_filter = null;
});
},
)
],
);
},
),
),
floatingActionButton: FloatingActionButton(
onPressed: addToList,
tooltip: 'Add to List',
child: Icon(Icons.add),
), // This trailing comma makes auto-formatting nicer for build methods.
);
}
}
const List<String> names = [
"Michael",
"James",
"John",
"Robert",
"David",
"William",
"Mary",
"Christopher",
"Joseph",
"Richard",
"Daniel",
"Thomas",
"Matthew",
"Jennifer",
"Charles",
"Anthony",
"Patricia",
"Linda",
"Mark",
"Elizabeth",
"Joshua",
"Steven",
"Andrew",
"Kevin",
"Brian",
"Barbara",
"Jessica",
"Jason",
"Susan",
"Timothy",
"Paul",
"Kenneth",
"Lisa",
"Ryan",
"Sarah",
"Karen",
"Jeffrey",
"Donald",
"Ashley",
"Eric",
"Jacob",
"Nicholas",
"Jonathan",
"Ronald",
"Michelle",
"Kimberly",
"Nancy",
"Justin",
"Sandra",
"Amanda",
"Brandon",
"Stephanie",
"Emily",
"Melissa",
"Gary",
"Edward",
"Stephen",
"Scott",
"George",
"Donna",
"Jose",
"Rebecca",
"Deborah",
"Laura",
"Cynthia",
"Carol",
"Amy",
"Margaret",
"Gregory",
"Sharon",
"Larry",
"Angela",
"Maria",
"Alexander",
"Benjamin",
"Nicole",
"Kathleen",
"Patrick",
"Samantha",
"Tyler",
"Samuel",
"Betty",
"Brenda",
"Pamela",
"Aaron",
"Kelly",
"Heather",
"Rachel",
"Adam",
"Christine",
"Zachary",
"Debra",
"Katherine",
"Dennis",
"Nathan",
"Christina",
"Julie",
"Jordan",
"Kyle",
"Anna",
];
Implement floating button at main page linking to new recipe page
300 ms are good
For example by drag and drop
Possible actions:
How could this be achieved?
Database uses git for version control.
Review system in app.
The rows have different white space on the left and right. The space should be equally wide.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.