-
Notifications
You must be signed in to change notification settings - Fork 0
/
banner.dart
49 lines (47 loc) · 1.81 KB
/
banner.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import 'package:flutter/material.dart';
class BannerWidget extends StatelessWidget {
const BannerWidget({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text("Banner"),
),
body: Center(
child: Container(
margin: const EdgeInsets.all(10.0),
child: ClipRect(
child: Banner(
location: BannerLocation.topEnd,
message: "25% Off",
child: Container(
color: Colors.grey,
child: Padding(
padding: const EdgeInsets.fromLTRB(10, 20, 10, 20),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Image.network(
"https://docs.flutter.dev/assets/images/shared/brand/flutter/logo/flutter-lockup.png"),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const Text(
'Get your laptop servicing Now!',
style: TextStyle(
fontSize: 17,
fontWeight: FontWeight.bold),
),
ElevatedButton(
onPressed: () {},
child: const Text('Register Now'))
],
)
],
),
)),
),
)),
));
}
}