-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patharticle.dart
158 lines (156 loc) · 5.14 KB
/
article.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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
//system package
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:lostandfound/home.dart';
import 'ui/bottomnavigation.dart';
import 'package:url_launcher/url_launcher.dart';
import 'ui/textme.dart';
class Article extends StatelessWidget {
final String title;
final String image;
final String periode;
final String lblassa;
final String typelost;
final String reward;
final String description;
final String tags;
final String postedby;
final String phonenumber;
Article(
{this.title,
this.image,
this.periode,
this.lblassa,
this.typelost,
this.reward,
this.description,
this.tags,
this.postedby,
this.phonenumber});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(
title: Text(title),
leading: new IconButton(
icon: new Icon(Icons.arrow_back),
onPressed: () => Navigator.of(context).pushReplacement(
MaterialPageRoute(builder: (context) => new Home())),
),
),
bottomNavigationBar: BotmNavigate(),
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
body: SingleChildScrollView(
child: Column(
children: <Widget>[
SizedBox(
width: 300, // hard coding child width
child: CachedNetworkImage(
placeholder: (context, url) => CircularProgressIndicator(),
errorWidget: (context, url, error) => Icon(Icons.error),
imageUrl: image,
),
),
SizedBox(
height: 10.0,
),
Column(
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Text(
typelost,
style: TextStyle(
backgroundColor: Colors.yellow,
fontWeight: FontWeight.bold),
),
Text(periode),
Text(lblassa),
],
),
],
),
SizedBox(
height: 10.0,
),
Textme(texte: title),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Text('Location ',
style: TextStyle(fontWeight: FontWeight.bold)),
Text(lblassa),
],
),
SizedBox(
height: 10.0,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Text('Reward ',
style: TextStyle(fontWeight: FontWeight.bold)),
Text(reward),
],
),
SizedBox(
height: 10.0,
),
Textme(texte: description),
Column(
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
Icon(
Icons.favorite,
color: Colors.pink,
size: 24.0,
semanticLabel:
'Text to announce in accessibility modes',
),
IconButton(
icon: new Icon(Icons.mail),
tooltip: 'mail',
onPressed: () {
launch('mailto://[email protected]');
},
),
IconButton(
icon: new Icon(Icons.info_outline),
tooltip: 'info',
onPressed: () {
//launch('mailto://[email protected]');
},
),
IconButton(
icon: new Icon(Icons.share),
tooltip: 'share',
onPressed: () {},
),
],
),
],
),
SizedBox(
height: 10.0,
),
Textme(texte: tags),
/*Text("send message"),
SizedBox(
height: 10.0,
),*/
Textme(texte: phonenumber),
ElevatedButton(
onPressed: () => launch('tel://$phonenumber'),
child: new Text("Call me")),
],
),
),
),
);
}
}