Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
medapp_eksad
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qorri_di
medapp_eksad
Commits
0291eadd
Commit
0291eadd
authored
Aug 31, 2022
by
Budi Prasetyo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
image sleding
parent
94a598d8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
25 deletions
+56
-25
our_solution2.dart
lib/screen/solution/our_solution2.dart
+1
-1
image_slide.dart
lib/widget/image_slide.dart
+55
-24
No files found.
lib/screen/solution/our_solution2.dart
View file @
0291eadd
...
...
@@ -19,7 +19,7 @@ class _OurSolution2State extends State<OurSolution2> {
height:
screenSize
.
height
*
0.75
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
screenSize
.
width
*
0.1
,
vertical:
screenSize
.
height
*
0.1
),
child:
Container
(
width:
screenSize
.
width
*
0.
8
,
width:
screenSize
.
width
*
0.
75
,
height:
screenSize
.
height
*
0.65
,
child:
VerticalSlider
(),
...
...
lib/widget/image_slide.dart
View file @
0291eadd
...
...
@@ -19,7 +19,7 @@ final List<Widget> imageSliders = imgList
Image
.
asset
(
item
,
fit:
BoxFit
.
cover
,
width:
70
0
,
width:
84
0
,
),
Positioned
(
bottom:
0.0
,
...
...
@@ -36,17 +36,17 @@ final List<Widget> imageSliders = imgList
end:
Alignment
.
topCenter
,
),
),
padding:
const
EdgeInsets
.
symmetric
(
vertical:
10.0
,
horizontal:
20.0
),
child:
const
Text
(
'Bootcamp'
,
//'No. ${imgList.indexOf(item)} image',
style:
TextStyle
(
color:
Colors
.
white
,
fontSize:
20.0
,
fontWeight:
FontWeight
.
bold
,
),
),
//
padding: const EdgeInsets.symmetric(
//
vertical: 10.0, horizontal: 20.0),
//
child: const Text(
//
'Bootcamp',
//
//'No. ${imgList.indexOf(item)} image',
//
style: TextStyle(
//
color: Colors.white,
//
fontSize: 20.0,
//
fontWeight: FontWeight.bold,
//
),
//
),
),
),
],
...
...
@@ -54,23 +54,54 @@ final List<Widget> imageSliders = imgList
),
))
.
toList
();
final
CarouselController
_controller
=
CarouselController
();
@override
void
initState
(
)
{
initState
();
}
class
VerticalSlider
extends
StatelessWidget
{
@override
Widget
build
(
BuildContext
context
)
{
var
screenSize
=
MediaQuery
.
of
(
context
).
size
;
return
Container
(
width:
screenSize
.
width
*
0.27
,
height:
screenSize
.
height
*
0.33
,
child:
CarouselSlider
(
carouselController:
CarouselController
(),
options:
CarouselOptions
(
aspectRatio:
2.0
,
enlargeCenterPage:
true
,
scrollDirection:
Axis
.
horizontal
,
autoPlay:
true
,
return
Stack
(
children:
[
Container
(
width:
screenSize
.
width
*
0.8
,
child:
CarouselSlider
(
carouselController:
_controller
,
options:
CarouselOptions
(
aspectRatio:
2.0
,
enlargeCenterPage:
true
,
scrollDirection:
Axis
.
horizontal
,
autoPlay:
true
,
),
items:
imageSliders
,
),
),
Center
(
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Flexible
(
child:
ElevatedButton
(
onPressed:
()
=>
_controller
.
previousPage
(),
child:
Icon
(
Icons
.
arrow_back_rounded
),
style:
ElevatedButton
.
styleFrom
(
primary:
Colors
.
grey
),
),
),
Flexible
(
child:
ElevatedButton
(
onPressed:
()
=>
_controller
.
nextPage
(),
child:
Icon
(
Icons
.
arrow_forward
),
style:
ElevatedButton
.
styleFrom
(
primary:
Colors
.
grey
),
),
),
],
),
items:
imageSliders
,
));
)
],
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment