Commit cc1dbe30 authored by r.manan@eksad.com's avatar r.manan@eksad.com

Home: pindah folder logo

Solution: our_solution2
widget: image_slider
pubspecyaml: add dependency
parent 7d46175c
......@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:medapp_eksad/appbar/appbar_home.dart';
import 'package:medapp_eksad/screen/footer.dart';
import 'package:medapp_eksad/screen/solution/our_solution.dart';
import 'package:medapp_eksad/screen/solution/our_solution2.dart';
import 'package:medapp_eksad/widget/responsive.dart';
import 'package:flutter/services.dart';
......@@ -32,7 +33,10 @@ class _SolutionsState extends State<Solutions> {
: AppbarHomeLarge(screenSize, context, Colors.black, Colors.black,
Colors.blue, Colors.black, Colors.black),
body: ListView(
children: [OurSolution(), Footer()],
children: [
OurSolution(),
OurSolution2(),
Footer()],
),
);
}
......
import 'package:flutter/material.dart';
import 'package:medapp_eksad/widget/image_slide.dart';
class OurSolution2 extends StatefulWidget {
const OurSolution2({Key? key}) : super(key: key);
@override
State<OurSolution2> createState() => _OurSolution2State();
}
class _OurSolution2State extends State<OurSolution2> {
@override
Widget build(BuildContext context) {
var screenSize = MediaQuery.of(context).size;
return Container(
width: screenSize.width,
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,
height: screenSize.height*0.65,
child: VerticalSlider(),
),
);
}
}
import 'package:flutter/material.dart';
import 'package:carousel_slider/carousel_slider.dart';
final List<String> imgList = [
'/images/homepage.png',
'/images/solution.jpg',
'/images/contactus1.jpg',
];
final List<Widget> imageSliders = imgList
.map((item) => Container(
child: Container(
margin: const EdgeInsets.all(5.0),
child: ClipRRect(
borderRadius: const BorderRadius.all(Radius.circular(5.0)),
child: Stack(
children: <Widget>[
Image.asset(
item,
fit: BoxFit.cover,
width: 500,
),
Positioned(
bottom: 0.0,
left: 0.0,
right: 0.0,
child: Container(
decoration: const BoxDecoration(
gradient: LinearGradient(
colors: [
Color.fromARGB(200, 0, 0, 0),
Color.fromARGB(0, 0, 0, 0)
],
begin: Alignment.bottomCenter,
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,
),
),
),
),
],
)),
),
))
.toList();
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(
options: CarouselOptions(
aspectRatio: 2.0,
enlargeCenterPage: true,
scrollDirection: Axis.horizontal,
autoPlay: true,
),
items: imageSliders,
));
}
}
......@@ -15,6 +15,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
carousel_indicator:
dependency: "direct main"
description:
name: carousel_indicator
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.6"
carousel_slider:
dependency: "direct main"
description:
name: carousel_slider
url: "https://pub.dartlang.org"
source: hosted
version: "4.1.1"
characters:
dependency: transitive
description:
......@@ -261,6 +275,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "4.2.4"
scaled_list:
dependency: "direct main"
description:
name: scaled_list
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
show_up_animation:
dependency: "direct main"
description:
......
......@@ -46,6 +46,9 @@ dependencies:
show_up_animation: ^2.0.0
http: ^0.13.4
spring: ^2.0.2
carousel_slider: ^4.1.1
carousel_indicator: ^1.0.6
scaled_list: ^2.0.0
dev_dependencies:
flutter_test:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment