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> {
...
@@ -19,7 +19,7 @@ class _OurSolution2State extends State<OurSolution2> {
height:
screenSize
.
height
*
0.75
,
height:
screenSize
.
height
*
0.75
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
screenSize
.
width
*
0.1
,
vertical:
screenSize
.
height
*
0.1
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
screenSize
.
width
*
0.1
,
vertical:
screenSize
.
height
*
0.1
),
child:
Container
(
child:
Container
(
width:
screenSize
.
width
*
0.
8
,
width:
screenSize
.
width
*
0.
75
,
height:
screenSize
.
height
*
0.65
,
height:
screenSize
.
height
*
0.65
,
child:
VerticalSlider
(),
child:
VerticalSlider
(),
...
...
lib/widget/image_slide.dart
View file @
0291eadd
...
@@ -19,7 +19,7 @@ final List<Widget> imageSliders = imgList
...
@@ -19,7 +19,7 @@ final List<Widget> imageSliders = imgList
Image
.
asset
(
Image
.
asset
(
item
,
item
,
fit:
BoxFit
.
cover
,
fit:
BoxFit
.
cover
,
width:
70
0
,
width:
84
0
,
),
),
Positioned
(
Positioned
(
bottom:
0.0
,
bottom:
0.0
,
...
@@ -36,17 +36,17 @@ final List<Widget> imageSliders = imgList
...
@@ -36,17 +36,17 @@ final List<Widget> imageSliders = imgList
end:
Alignment
.
topCenter
,
end:
Alignment
.
topCenter
,
),
),
),
),
padding:
const
EdgeInsets
.
symmetric
(
//
padding: const EdgeInsets.symmetric(
vertical:
10.0
,
horizontal:
20.0
),
//
vertical: 10.0, horizontal: 20.0),
child:
const
Text
(
//
child: const Text(
'Bootcamp'
,
//
'Bootcamp',
//'No. ${imgList.indexOf(item)} image',
//
//'No. ${imgList.indexOf(item)} image',
style:
TextStyle
(
//
style: TextStyle(
color:
Colors
.
white
,
//
color: Colors.white,
fontSize:
20.0
,
//
fontSize: 20.0,
fontWeight:
FontWeight
.
bold
,
//
fontWeight: FontWeight.bold,
),
//
),
),
//
),
),
),
),
),
],
],
...
@@ -54,23 +54,54 @@ final List<Widget> imageSliders = imgList
...
@@ -54,23 +54,54 @@ final List<Widget> imageSliders = imgList
),
),
))
))
.
toList
();
.
toList
();
final
CarouselController
_controller
=
CarouselController
();
@override
void
initState
(
)
{
initState
();
}
class
VerticalSlider
extends
StatelessWidget
{
class
VerticalSlider
extends
StatelessWidget
{
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
var
screenSize
=
MediaQuery
.
of
(
context
).
size
;
var
screenSize
=
MediaQuery
.
of
(
context
).
size
;
return
Container
(
return
Stack
(
width:
screenSize
.
width
*
0.27
,
children:
[
height:
screenSize
.
height
*
0.33
,
Container
(
child:
CarouselSlider
(
width:
screenSize
.
width
*
0.8
,
carouselController:
CarouselController
(),
child:
CarouselSlider
(
options:
CarouselOptions
(
carouselController:
_controller
,
aspectRatio:
2.0
,
options:
CarouselOptions
(
enlargeCenterPage:
true
,
aspectRatio:
2.0
,
scrollDirection:
Axis
.
horizontal
,
enlargeCenterPage:
true
,
autoPlay:
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