ft/adds logo and background image
This commit is contained in:
parent
5f3952ea22
commit
be41924b3b
BIN
frontend/app/lib/assets/hero-pattern-300x200.png
Normal file
BIN
frontend/app/lib/assets/hero-pattern-300x200.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
BIN
frontend/app/lib/assets/logo_300x200.png
Normal file
BIN
frontend/app/lib/assets/logo_300x200.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.9 KiB |
@ -2,6 +2,9 @@ import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:app/pages/main_screen.dart';
|
||||
|
||||
void main() {
|
||||
runApp(MaterialApp(home: MainScreen()));
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
runApp(MaterialApp(
|
||||
home: MainScreen(),
|
||||
));
|
||||
}
|
||||
|
@ -15,17 +15,55 @@ class MainScreen extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
test();
|
||||
},
|
||||
child: const Text('Button'))
|
||||
],
|
||||
return Container(
|
||||
decoration: const BoxDecoration(
|
||||
// color: Color.fromARGB(230, 255, 255, 255),
|
||||
gradient: LinearGradient(
|
||||
colors: [Colors.black, Colors.white],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
),
|
||||
image: DecorationImage(
|
||||
image: AssetImage(
|
||||
'lib/assets/hero-pattern-300x200.png',
|
||||
// color: Colors.grey,
|
||||
),
|
||||
repeat: ImageRepeat.repeat,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.black,
|
||||
flexibleSpace: Image.asset(
|
||||
'lib/assets/logo_300x200.png',
|
||||
height: 80,
|
||||
),
|
||||
actions: [
|
||||
IconButton(
|
||||
onPressed: () {},
|
||||
icon: const Icon(Icons.menu),
|
||||
tooltip: 'Menu',
|
||||
),
|
||||
// IconButton(
|
||||
// onPressed: () {},
|
||||
// icon: const Icon(Icons.login_sharp),
|
||||
// tooltip: 'Login',
|
||||
// ),
|
||||
],
|
||||
),
|
||||
body: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
test();
|
||||
},
|
||||
child: const Text('Button'))
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -64,7 +64,9 @@ flutter:
|
||||
uses-material-design: true
|
||||
|
||||
# To add assets to your application, add an assets section, like this:
|
||||
# assets:
|
||||
assets:
|
||||
- lib/assets/logo_300x200.png
|
||||
- lib/assets/hero-pattern-300x200.png
|
||||
# - images/a_dot_burr.jpeg
|
||||
# - images/a_dot_ham.jpeg
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user