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';
|
import 'package:app/pages/main_screen.dart';
|
||||||
|
|
||||||
void main() {
|
void main() async {
|
||||||
runApp(MaterialApp(home: MainScreen()));
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
|
runApp(MaterialApp(
|
||||||
|
home: MainScreen(),
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
@ -15,17 +15,55 @@ class MainScreen extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Container(
|
||||||
body: Column(
|
decoration: const BoxDecoration(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
// color: Color.fromARGB(230, 255, 255, 255),
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
gradient: LinearGradient(
|
||||||
children: [
|
colors: [Colors.black, Colors.white],
|
||||||
TextButton(
|
begin: Alignment.topCenter,
|
||||||
onPressed: () {
|
end: Alignment.bottomCenter,
|
||||||
test();
|
),
|
||||||
},
|
image: DecorationImage(
|
||||||
child: const Text('Button'))
|
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
|
uses-material-design: true
|
||||||
|
|
||||||
# To add assets to your application, add an assets section, like this:
|
# 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_burr.jpeg
|
||||||
# - images/a_dot_ham.jpeg
|
# - images/a_dot_ham.jpeg
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user