-
Notifications
You must be signed in to change notification settings - Fork 19
/
day076_ignore_pointer.dart
60 lines (58 loc) · 1.84 KB
/
day076_ignore_pointer.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
import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart';
class Day76IgnorePointer extends StatelessWidget {
const Day76IgnorePointer({Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
// ? What is IgnorePointer....
/**
* ! IgnorePointer is the cool widget for stop the user activity in the ui....
*/
body: Column(
children: <Widget>[
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
"Can't Scroll the list because it is ignored by IgnorePointer",
style: TextStyle(fontSize: 20),
),
),
Expanded(
child: IgnorePointer(
// ! simplely added IgnorePointer....
ignoring: true, // ! and set the [ignoring] to true....
child: ListView.builder(
// ! so that this listview can't able to scroll....
itemBuilder: (BuildContext context, int index) {
return ListTile(
title: Text("Item - $index"),
);
},
),
),
),
],
),
appBar: AppBar(
title: Text('IgnorePointer'),
actions: <Widget>[
IconButton(
icon: Icon(Icons.help),
onPressed: () async {
const url =
'https://github.com/sanjaysanju618/100-Days-Of-Flutter-Widgets/' +
'blob/master/hundred_days_of_flutter_widget/' +
'lib/day076_ignore_pointer.dart';
if (await canLaunch(url)) {
await launch(url);
} else {
throw 'Could not launch $url';
}
},
)
],
),
);
}
}