first commit
This commit is contained in:
commit
39e38f931f
382 changed files with 520450 additions and 0 deletions
13
lib/widgets/cards/overview_card.dart
Normal file
13
lib/widgets/cards/overview_card.dart
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
class Overviewcard extends StatelessWidget {
|
||||
Overviewcard(this.temperatur, {super.key});
|
||||
|
||||
Color mainColor = Colors.red;
|
||||
int temperatur = 15;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Placeholder();
|
||||
}
|
||||
}
|
||||
55
lib/widgets/cards/wool_card.dart
Normal file
55
lib/widgets/cards/wool_card.dart
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:hexcolor/hexcolor.dart';
|
||||
import 'package:temperaturdecke/screens/wool_modal.dart';
|
||||
import 'package:temperaturdecke/widgets/custom_card.dart';
|
||||
|
||||
class Woolcard extends StatelessWidget {
|
||||
Woolcard(this.id, this.manufacture, this.title, this.color, {super.key});
|
||||
|
||||
int id;
|
||||
String manufacture;
|
||||
String title;
|
||||
String color;
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return CustomCard(Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
height: 70,
|
||||
width: 30,
|
||||
color: HexColor(color),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: Column(
|
||||
children: [
|
||||
Text(title),
|
||||
Text(manufacture),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: IconButton(
|
||||
onPressed: () {
|
||||
showModalBottomSheet(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return WoolModal(id);
|
||||
},
|
||||
);
|
||||
},
|
||||
icon: Icon(Icons.more_vert),
|
||||
alignment: Alignment.centerRight,
|
||||
),
|
||||
)
|
||||
],
|
||||
));
|
||||
}
|
||||
}
|
||||
23
lib/widgets/custom_card.dart
Normal file
23
lib/widgets/custom_card.dart
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
class CustomCard extends StatelessWidget {
|
||||
CustomCard(this.child, {super.key});
|
||||
|
||||
Widget child;
|
||||
double radius = 20;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ClipRRect(
|
||||
borderRadius: BorderRadius.all(Radius.circular(radius)),
|
||||
child: Container(
|
||||
width: double.maxFinite,
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.secondaryContainer,
|
||||
borderRadius: BorderRadius.all(Radius.circular(radius)),
|
||||
),
|
||||
child: child,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
140
lib/widgets/daily_blob.dart
Normal file
140
lib/widgets/daily_blob.dart
Normal file
|
|
@ -0,0 +1,140 @@
|
|||
import 'package:blobs/blobs.dart';
|
||||
import 'package:dynamic_color/dynamic_color.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class Dailyblob extends StatelessWidget {
|
||||
Dailyblob(this.temperatur, {super.key});
|
||||
|
||||
int temperatur;
|
||||
Color mainColor = Color.fromARGB(255, 233, 125, 224);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Color blobColor = mainColor.harmonizeWith(Theme.of(context).canvasColor);
|
||||
Color grad1 = Color.fromARGB(
|
||||
blobColor.alpha,
|
||||
(blobColor.red * 0.85).round(),
|
||||
(blobColor.green * 0.85).round(),
|
||||
(blobColor.blue * 0.85).round(),
|
||||
);
|
||||
|
||||
return Stack(
|
||||
alignment: AlignmentDirectional.center,
|
||||
children: [
|
||||
Blob.animatedFromID(
|
||||
loop: true,
|
||||
duration: Duration(milliseconds: 1300),
|
||||
size: 365,
|
||||
styles: BlobStyles(
|
||||
color: Color.fromARGB(
|
||||
blobColor.alpha,
|
||||
(blobColor.red * 0.8).round(),
|
||||
(blobColor.green * 0.8).round(),
|
||||
(blobColor.blue * 0.8).round(),
|
||||
).harmonizeWith(blobColor)),
|
||||
id: [
|
||||
'6-9-12903',
|
||||
'6-9-438',
|
||||
'6-9-9807',
|
||||
'6-9-18',
|
||||
'6-9-9260',
|
||||
'6-9-12903',
|
||||
'6-9-17311',
|
||||
],
|
||||
),
|
||||
Blob.animatedFromID(
|
||||
loop: true,
|
||||
duration: Duration(milliseconds: 1000),
|
||||
size: 355,
|
||||
styles: BlobStyles(
|
||||
color: Color.fromARGB(
|
||||
blobColor.alpha,
|
||||
(blobColor.red * 0.9).round(),
|
||||
(blobColor.green * 0.9).round(),
|
||||
(blobColor.blue * 0.9).round(),
|
||||
).harmonizeWith(blobColor)),
|
||||
id: const [
|
||||
'6-9-438',
|
||||
'6-9-9807',
|
||||
'6-9-18',
|
||||
'6-9-9260',
|
||||
'6-9-12903',
|
||||
'6-9-17311'
|
||||
],
|
||||
),
|
||||
Blob.animatedFromID(
|
||||
loop: true,
|
||||
duration: Duration(milliseconds: 1500),
|
||||
size: 340,
|
||||
styles: BlobStyles(color: blobColor),
|
||||
id: const [
|
||||
'6-9-17311',
|
||||
'6-9-438',
|
||||
'6-9-9807',
|
||||
'6-9-18',
|
||||
'6-9-9260',
|
||||
'6-9-12903',
|
||||
],
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
ShaderMask(
|
||||
blendMode: BlendMode.srcIn,
|
||||
shaderCallback: (Rect bounds) {
|
||||
return LinearGradient(
|
||||
colors: blobColor.computeLuminance() > 0.1
|
||||
? [
|
||||
Color.fromARGB(
|
||||
blobColor.alpha,
|
||||
(blobColor.red * 0.35).round(),
|
||||
(blobColor.green * 0.35).round(),
|
||||
(blobColor.blue * 0.35).round(),
|
||||
),
|
||||
Color.fromARGB(
|
||||
blobColor.alpha,
|
||||
(blobColor.red * 0.5).round(),
|
||||
(blobColor.green * 0.5).round(),
|
||||
(blobColor.blue * 0.5).round(),
|
||||
)
|
||||
]
|
||||
: [
|
||||
Color.fromARGB(
|
||||
blobColor.alpha,
|
||||
(blobColor.red * 2.2).round(),
|
||||
(blobColor.green * 2.2).round(),
|
||||
(blobColor.blue * 2.2).round(),
|
||||
),
|
||||
Color.fromARGB(
|
||||
blobColor.alpha,
|
||||
(blobColor.red * 1.8).round(),
|
||||
(blobColor.green * 1.8).round(),
|
||||
(blobColor.blue * 1.8).round(),
|
||||
),
|
||||
],
|
||||
).createShader(bounds);
|
||||
},
|
||||
child: Column(
|
||||
children: [
|
||||
Text(
|
||||
"$temperatur °C",
|
||||
style: TextStyle(
|
||||
height: 1,
|
||||
fontSize: 25,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
"Farbe",
|
||||
style: TextStyle(
|
||||
fontSize: 45,
|
||||
fontWeight: FontWeight.w800,
|
||||
),
|
||||
)
|
||||
],
|
||||
)),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
10
lib/widgets/overviewCard.dart
Normal file
10
lib/widgets/overviewCard.dart
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
class Overviewcard extends StatelessWidget {
|
||||
const Overviewcard({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const Placeholder();
|
||||
}
|
||||
}
|
||||
Reference in a new issue