-
Notifications
You must be signed in to change notification settings - Fork 410
/
detailscreen.dart
117 lines (112 loc) 路 4 KB
/
detailscreen.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
import 'package:flutter/material.dart';
import 'package:showcaseview/showcaseview.dart';
class Detail extends StatefulWidget {
const Detail({Key? key}) : super(key: key);
@override
State<Detail> createState() => _DetailState();
}
class _DetailState extends State<Detail> {
final GlobalKey _one = GlobalKey();
BuildContext? myContext;
@override
void initState() {
super.initState();
WidgetsBinding.instance.addPostFrameCallback(
(_) => Future.delayed(const Duration(milliseconds: 200), () {
ShowCaseWidget.of(myContext!).startShowCase([_one]);
}),
);
}
@override
Widget build(BuildContext context) {
return ShowCaseWidget(
builder: (context) {
myContext = context;
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.transparent,
elevation: 0,
leading: IconButton(
icon: const Icon(
Icons.arrow_back,
color: Colors.black,
),
onPressed: () {
Navigator.pop(context);
},
),
),
body: Padding(
padding: const EdgeInsets.all(16),
child: ListView(
children: <Widget>[
Showcase(
key: _one,
title: 'Title',
description: 'Desc',
child: InkWell(
onTap: () {},
child: const Text(
'Flutter Notification',
style: TextStyle(
fontSize: 25,
fontWeight: FontWeight.w600,
),
),
),
),
const SizedBox(
height: 16,
),
const Text(
'Hi, you have new Notification from flutter group, open '
'slack and check it out',
style: TextStyle(fontSize: 18, fontWeight: FontWeight.w500),
),
const SizedBox(
height: 16,
),
RichText(
text: const TextSpan(
style: TextStyle(
fontWeight: FontWeight.w400,
color: Colors.black,
),
children: [
TextSpan(text: 'Hi team,\n\n'),
TextSpan(
text: 'As some of you know, we鈥檙e moving to Slack for '
'our internal team communications. Slack is a '
'messaging app where we can talk, share files, '
'and work together. It also connects with tools '
'we already use, like [add your examples here], '
'plus 900+ other apps.\n\n',
),
TextSpan(
text: 'Why are we moving to Slack?\n\n',
style: TextStyle(
fontWeight: FontWeight.w600,
color: Colors.black,
),
),
TextSpan(
text: 'We want to use the best communication tools to '
'make our lives easier and be more productive. '
'Having everything in one place will help us '
'work together better and faster, rather than '
'jumping around between emails, IMs, texts and '
'a bunch of other programs. Everything you share '
'in Slack is automatically indexed and archived, '
'creating a searchable archive of all our work.',
),
],
),
),
],
),
),
);
},
);
}
}