1
+ import 'package:cached_network_image/cached_network_image.dart' ;
1
2
/**
2
3
* Author: Damodar Lohani
3
4
* profile: https://github.com/lohanidamodar
6
7
import 'package:flutter/material.dart' ;
7
8
import 'package:flutter_swiper/flutter_swiper.dart' ;
8
9
import 'package:flutter_ui_challenges/core/presentation/res/assets.dart' ;
10
+ import 'package:flutter_ui_challenges/src/widgets/network_image.dart' ;
9
11
import 'package:font_awesome_flutter/font_awesome_flutter.dart' ;
10
12
import 'package:flutter_ui_challenges/src/widgets/swiper_pagination.dart' ;
11
13
@@ -25,16 +27,14 @@ class _IntroFourPageState extends State<IntroFourPage> {
25
27
"Nulla facilisi. \n Fusce non tempus risus.\n Sed ultrices scelerisque sem,"
26
28
];
27
29
28
- final String bgImage = "assets/img/photographer.jpg" ;
29
-
30
30
@override
31
31
Widget build (BuildContext context){
32
32
return Scaffold (
33
33
body: Stack (
34
34
children: < Widget > [
35
35
Container (
36
36
alignment: Alignment .center,
37
- child: Image . asset (bgImage , fit: BoxFit .contain,),
37
+ child: PNetworkImage (photographer , fit: BoxFit .contain,),
38
38
),
39
39
Column (
40
40
children: < Widget > [
@@ -108,7 +108,7 @@ class _IntroFourPageState extends State<IntroFourPage> {
108
108
decoration: BoxDecoration (
109
109
borderRadius: BorderRadius .circular (30.0 ),
110
110
image: DecorationImage (
111
- image: AssetImage (icon),
111
+ image: CachedNetworkImageProvider (icon),
112
112
fit: BoxFit .cover,
113
113
colorFilter: ColorFilter .mode (Colors .black38, BlendMode .multiply)
114
114
),
0 commit comments