1
1
import 'package:adityagurjar/models/project_model.dart' ;
2
2
import 'package:flutter/material.dart' ;
3
3
import 'dart:html' as html;
4
+
4
5
class ProjectWidget extends StatelessWidget {
5
6
final Project _project;
6
7
final double _bottomPadding;
7
- ProjectWidget (this ._project,this ._bottomPadding );
8
+ ProjectWidget (this ._project, this ._bottomPadding);
8
9
9
10
@override
10
11
Widget build (BuildContext context) {
11
12
final width = MediaQuery .of (context).size.width;
12
13
final height = MediaQuery .of (context).size.height;
13
14
return Card (
14
- margin: EdgeInsets .fromLTRB (16.0 ,16.0 ,16.0 ,_bottomPadding),
15
- child: InkWell (
16
- onTap: onProjectClick,
17
- child: Padding (
15
+ margin: EdgeInsets .fromLTRB (16.0 , 16.0 , 16.0 , _bottomPadding),
16
+ child: InkWell (
17
+ onTap: onProjectClick,
18
+ child: Padding (
18
19
padding: const EdgeInsets .all (8.0 ),
19
20
child: Row (
20
21
crossAxisAlignment: CrossAxisAlignment .start,
@@ -25,7 +26,7 @@ class ProjectWidget extends StatelessWidget {
25
26
child: Image .asset (
26
27
_project.image,
27
28
width: width * .25 ,
28
- height: width* .25 ,
29
+ height: width * .25 ,
29
30
)),
30
31
Expanded (
31
32
flex: 3 ,
@@ -35,13 +36,13 @@ class ProjectWidget extends StatelessWidget {
35
36
flex: 60 ,
36
37
child: Container (
37
38
padding: EdgeInsets .only (top: 8.0 ),
38
- child: Column (
39
- mainAxisSize: MainAxisSize .max,
40
- mainAxisAlignment: MainAxisAlignment .start,
41
- crossAxisAlignment: CrossAxisAlignment .start,
39
+ child: Wrap (
40
+ direction: Axis .horizontal,
42
41
children: < Widget > [
43
- Text (_project.name,
44
- style: Theme .of (context).textTheme.title),
42
+ Text (
43
+ _project.name,
44
+ style: Theme .of (context).textTheme.headline6,
45
+ ),
45
46
SizedBox (
46
47
height: height * .01 ,
47
48
),
@@ -61,9 +62,7 @@ class ProjectWidget extends StatelessWidget {
61
62
);
62
63
}
63
64
64
- void onProjectClick (){
65
- if (_project.link!= null )
66
- html.window.open (_project.link, 'adityadroid' );
67
- }
68
-
65
+ void onProjectClick () {
66
+ if (_project.link != null ) html.window.open (_project.link, 'adityadroid' );
67
+ }
69
68
}
0 commit comments