Skip to content

Instantly share code, notes, and snippets.

@fkromer
Created November 10, 2021 16:43
Show Gist options
  • Save fkromer/f6dbe6acc82376092ba622f90f82e31a to your computer and use it in GitHub Desktop.
Save fkromer/f6dbe6acc82376092ba622f90f82e31a to your computer and use it in GitHub Desktop.
Basket Card Example
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Widget Example Demo',
debugShowCheckedModeBanner: false,
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(title: 'Basket Card'),
);
}
}
class MyHomePage extends StatefulWidget {
final String title;
const MyHomePage({
Key? key,
required this.title,
}) : super(key: key);
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Card(
child: Column(
children: <Widget>[
Image.network('https://media.gettyimages.com/photos/germany-cologne-view-of-picnic-basket-picture-id155785604?s=2048x2048'),
Padding(
padding: const EdgeInsets.all(7.0),
child: Column(
children: <Widget>[
Padding(
padding: const EdgeInsets.all(7.0),
child: Row(
children: [
Padding(
padding: EdgeInsets.all(7.0),
child: Text('Veröffentlicht am:', style: TextStyle(fontWeight: FontWeight.bold),)
),
Padding(
padding: EdgeInsets.all(7.0),
child: Text('Samstag, 6. Nov. 12:47 Uhr')
),
]
),
),
Padding(
padding: const EdgeInsets.all(7.0),
child: Row(
children: [
Padding(
padding: EdgeInsets.all(7.0),
child: Text('Gültig bis:', style: TextStyle(fontWeight: FontWeight.bold),)
),
Padding(
padding: EdgeInsets.all(7.0),
child: Text('Samstag, 20. Nov. 00:00 Uhr')
),
]
),
),
Padding(
padding: const EdgeInsets.all(7.0),
child: Text('Kaffekapseln für die Nescafé Maschine 3 Pakete MHD 04.21 und 10.21')
)
],
))
],
),
),
],
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment