Flutter-Ernaehrungsapp/lib/pages/nav_pages/today_page.dart

239 lines
10 KiB
Dart
Raw Normal View History

2023-04-23 13:08:04 +02:00
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class TodayPage extends StatefulWidget {
final String title;
const TodayPage({Key? key, required this.title}) : super(key: key);
@override
State<TodayPage> createState() => _TodayPageState();
}
class _TodayPageState extends State<TodayPage> {
String calories = "123 Cals";
@override
Widget build(BuildContext context) {
return Scaffold(
body: SingleChildScrollView(
child: Column(
children: <Widget>[
Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(5), // if you need this
side: BorderSide(
color: Colors.grey.withOpacity(.2),
width: 1,
),
),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [Text('Frühstück'), Text('Cals 123')],
),
SizedBox(
height: 200,
child: Stack(
children: <Widget>[
SingleChildScrollView(
scrollDirection: Axis.vertical,
child: Column(
children: [
Padding(
padding: EdgeInsets.fromLTRB(8.0, 13.0, 8.0, 0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
height: 50.0,
width: 60.0,
child: ClipRRect(
borderRadius: BorderRadius.circular(15.0),
child: Image.network(
'https://onlinejpgtools.com/images/examples-onlinejpgtools/coffee-resized.jpg',
fit: BoxFit.cover,
),
),
),
SizedBox(
width: 8,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
'Cafe Coffee Day',
style: TextStyle(
color: Colors.black,
fontSize: 18,
fontWeight: FontWeight.w600,
),
),
Text(
'Alpha 1, Greater Noida',
style: TextStyle(color: Colors.grey),
),
],
),
],
),
),
Divider(
color: Colors.black,
thickness: .2,
indent: 8,
endIndent: 8,
),
Padding(
padding: EdgeInsets.fromLTRB(8.0, 13.0, 8.0, 0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
height: 50.0,
width: 60.0,
child: ClipRRect(
borderRadius: BorderRadius.circular(15.0),
child: Image.network(
'https://onlinejpgtools.com/images/examples-onlinejpgtools/coffee-resized.jpg',
fit: BoxFit.cover,
),
),
),
SizedBox(
width: 8,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
'Cafe Coffee Day',
style: TextStyle(
color: Colors.black,
fontSize: 18,
fontWeight: FontWeight.w600,
),
),
Text(
'Alpha 1, Greater Noida',
style: TextStyle(color: Colors.grey),
),
],
),
],
),
),
Divider(
color: Colors.black,
thickness: .2,
indent: 8,
endIndent: 8,
),
Padding(
padding: EdgeInsets.fromLTRB(8.0, 13.0, 8.0, 0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
height: 50.0,
width: 60.0,
child: ClipRRect(
borderRadius: BorderRadius.circular(15.0),
child: Image.network(
'https://onlinejpgtools.com/images/examples-onlinejpgtools/coffee-resized.jpg',
fit: BoxFit.cover,
),
),
),
SizedBox(
width: 8,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
'Cafe Coffee Day',
style: TextStyle(
color: Colors.black,
fontSize: 18,
fontWeight: FontWeight.w600,
),
),
Text(
'Alpha 1, Greater Noida',
style: TextStyle(color: Colors.grey),
),
],
),
],
),
),
Divider(
color: Colors.black,
thickness: .2,
indent: 8,
endIndent: 8,
),
Padding(
padding: EdgeInsets.fromLTRB(8.0, 13.0, 8.0, 0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
height: 50.0,
width: 60.0,
child: ClipRRect(
borderRadius: BorderRadius.circular(15.0),
child: Image.network(
'https://onlinejpgtools.com/images/examples-onlinejpgtools/coffee-resized.jpg',
fit: BoxFit.cover,
),
),
),
SizedBox(
width: 8,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
'Cafe Coffee Day',
style: TextStyle(
color: Colors.black,
fontSize: 18,
fontWeight: FontWeight.w600,
),
),
Text(
'Alpha 1, Greater Noida',
style: TextStyle(color: Colors.grey),
),
],
),
],
),
),
Divider(
color: Colors.black,
thickness: .2,
indent: 8,
endIndent: 8,
),
],
),
),
],
),
),
TextButton(onPressed: (){}, child: Text("Test"),
style: ButtonStyle(),)
]
),
),
],
)));
}
}