forked from md-siam/package_of_the_day
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmarquee.dart
More file actions
72 lines (70 loc) · 2.29 KB
/
Copy pathmarquee.dart
File metadata and controls
72 lines (70 loc) · 2.29 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:marquee/marquee.dart';
class MyMarquee extends StatelessWidget {
const MyMarquee({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('Marquee')),
body: Stack(
children: [
SizedBox(
height: double.infinity,
width: double.infinity,
child: Image.asset(
'assets/images/background/bulb.jpg',
fit: BoxFit.cover,
),
),
Column(
children: [
Container(
height: 40,
color: Colors.red,
child: Marquee(
text: 'Some sample text that takes some space.',
style: const TextStyle(
color: Colors.white,
fontSize: 30,
fontWeight: FontWeight.bold,
),
scrollAxis: Axis.horizontal,
crossAxisAlignment: CrossAxisAlignment.start,
blankSpace: 20.0,
velocity: 100.0,
pauseAfterRound: const Duration(seconds: 1),
startPadding: 10.0,
accelerationDuration: const Duration(seconds: 1),
accelerationCurve: Curves.linear,
decelerationDuration: const Duration(milliseconds: 500),
decelerationCurve: Curves.easeOut,
),
),
const SizedBox(height: 20.0),
Center(
child: Column(
children: const [
FaIcon(
FontAwesomeIcons.arrowUp,
color: Colors.white,
size: 30,
),
Text(
'That\'s cool 😮 !!',
style: TextStyle(
fontSize: 30,
color: Colors.white,
fontWeight: FontWeight.bold,
),
)
],
),
),
],
),
],
),
);
}
}