86 lines
2.7 KiB
Dart
86 lines
2.7 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:insparkspokalen_ui/models/teamModel.dart';
|
|
|
|
//Fixa så denna är rätt, kommer ej vara main
|
|
class InfoSmallpage extends StatefulWidget {
|
|
final TeamModel group;
|
|
|
|
const InfoSmallpage({super.key, required this.group});
|
|
|
|
@override
|
|
State<InfoSmallpage> createState() => InfoSmallpageState();
|
|
}
|
|
|
|
class InfoSmallpageState extends State<InfoSmallpage> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Card(
|
|
margin: const EdgeInsets.all(10),
|
|
color: Color(0xFFFEDF00),
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(12),
|
|
side: const BorderSide(color: Colors.black12),
|
|
),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
ListTile(
|
|
leading: const CircleAvatar(
|
|
backgroundImage: AssetImage(
|
|
"images/profilepic.jpg",
|
|
), // byt till nätbild sen och tänk på att assets framför ska bort
|
|
),
|
|
title: Text(
|
|
widget.group.name,
|
|
style: const TextStyle(
|
|
color: Colors.black,
|
|
fontWeight: FontWeight.bold,
|
|
),
|
|
),
|
|
subtitle: const Text(
|
|
"Tid: 12:30",
|
|
style: TextStyle(color: Colors.black),
|
|
),
|
|
//trailing: const Icon(Icons.more_vert, color: Colors.black),
|
|
),
|
|
Image.asset(
|
|
"images/testbild.jpg",
|
|
// Ska ej vara såhär, ska komma från api :)
|
|
width: double.infinity,
|
|
height: 300,
|
|
fit: BoxFit.cover,
|
|
), // byt till riktig bild
|
|
Padding(
|
|
padding: const EdgeInsets.all(8.0),
|
|
child: Row(
|
|
children: [
|
|
const Text(
|
|
"• Uppdrag ",
|
|
style: TextStyle(
|
|
fontWeight: FontWeight.bold,
|
|
fontSize: 16,
|
|
color: Colors.black,
|
|
),
|
|
),
|
|
const SizedBox(width: 8),
|
|
Chip(
|
|
label: Text(
|
|
widget.group.name ?? "Ej angivet",
|
|
// namn ska bytas ut men för nu blir det bara namnet
|
|
style: const TextStyle(color: Colors.black),
|
|
),
|
|
backgroundColor: Colors.amber,
|
|
shape: RoundedRectangleBorder(
|
|
side: const BorderSide(color: Colors.amber),
|
|
borderRadius: BorderRadius.circular(8),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|