Skip to content

Instantly share code, notes, and snippets.

@hansvdam
Created September 20, 2024 11:43
Show Gist options
  • Save hansvdam/d48692c9519457bd79ebff374bcd2e2a to your computer and use it in GitHub Desktop.
Save hansvdam/d48692c9519457bd79ebff374bcd2e2a to your computer and use it in GitHub Desktop.
Generated code from pixels2flutter.dev
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: HomePage(),
theme: ThemeData(
colorScheme: ColorScheme.fromSwatch().copyWith(
primary: Colors.grey[800],
secondary: Colors.green[200],
),
),
);
}
}
class HomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.grey[800],
appBar: AppBar(
backgroundColor: Colors.grey[800],
leading: Icon(Icons.home, color: Colors.white),
title: Text('5H10.61', style: TextStyle(color: Colors.white)),
actions: [
Padding(
padding: const EdgeInsets.all(16.0),
child: Text('12:00', style: TextStyle(color: Colors.white)),
),
],
),
body: Column(
children: [
Container(
color: Colors.green[200],
padding: EdgeInsets.all(8.0),
child: Row(
children: [
Image.network(
'https://placehold.co/40x40?description=An%20image%20of%20a%20card%20icon',
width: 40,
height: 40,
),
SizedBox(width: 8),
Text('KAART M2', style: TextStyle(fontSize: 18)),
Spacer(),
Text('1/5', style: TextStyle(fontSize: 18)),
],
),
),
Container(
padding: EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('5H10.61', style: TextStyle(fontSize: 24, color: Colors.white)),
SizedBox(height: 16),
Container(
color: Colors.green[200],
padding: EdgeInsets.all(8.0),
child: Row(
children: [
Image.network(
'https://placehold.co/40x40?description=An%20image%20of%20a%20fire%20icon',
width: 40,
height: 40,
),
SizedBox(width: 8),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('Brand', style: TextStyle(fontSize: 18)),
Text('5H10.61', style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold)),
],
),
],
),
),
],
),
),
Spacer(),
Container(
color: Colors.grey[300],
child: Row(
children: [
Expanded(
child: Column(
children: [
Image.network(
'https://placehold.co/40x40?description=An%20image%20of%20a%20warning%20icon',
width: 40,
height: 40,
),
Text('STORING', style: TextStyle(fontSize: 18)),
],
),
),
Expanded(
child: Column(
children: [
Image.network(
'https://placehold.co/40x40?description=An%20image%20of%20an%20incident%20icon',
width: 40,
height: 40,
),
Text('INCIDENT', style: TextStyle(fontSize: 18)),
],
),
),
],
),
),
Container(
color: Colors.grey[800],
padding: EdgeInsets.all(16.0),
child: Column(
children: [
Container(
color: Colors.grey[600],
padding: EdgeInsets.all(8.0),
child: Text('5G12', style: TextStyle(fontSize: 18, color: Colors.white)),
),
SizedBox(height: 8),
Text('AFMELDEN', style: TextStyle(fontSize: 18, color: Colors.white)),
],
),
),
],
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment