Commit 6e6511ba authored by Ade Fikriatul  Ilmi's avatar Ade Fikriatul Ilmi

fixing title dan scroll up di mobile and

parent 90e1188c
......@@ -67,20 +67,27 @@ class _HomePageState extends State<HomePage> {
body: ResponsiveWidget.isSmallScreen(context)
? Stack(
children: [
Title(
color: Colors.white,
child: ListView(
scrollDirection: Axis.vertical,
controller: controller2,
children: [
SmallHome1(wijet: Button_scroll_small()),
SmallHome2(),
SmallHome3(),
SmallHome4(),
ContactUs2_small(),
FooterSmall(),
],
),
FutureBuilder<dynamic>(
future: getSettingDesc2(),
builder: (BuildContext context, AsyncSnapshot snapshot) {
var pgm = snapshot.data[0];
return Title(
title: pgm['title'],
color: Colors.white,
child: ListView(
scrollDirection: Axis.vertical,
controller: controller2,
children: [
SmallHome1(wijet: Button_scroll_small()),
SmallHome2(),
SmallHome3(),
SmallHome4(),
ContactUs2_small(),
FooterSmall(),
],
),
);
},
),
ScrollUpButton(controller2),
],
......@@ -112,7 +119,6 @@ class _HomePageState extends State<HomePage> {
ScrollUpButton(controller2),
],
),
);
}
......
......@@ -37,7 +37,7 @@ class _SignInState extends State<SignIn> {
@override
Widget build(BuildContext context) {
setPageTitle('Login MedApps', context);
// setPageTitle('Login MedApps', context);
var screenSize = MediaQuery.of(context).size;
return Scaffold(
body: Stack(
......
......@@ -35,7 +35,7 @@ class AboutUs extends StatefulWidget {
}
class _AboutUsState extends State<AboutUs> {
// Untuk pake PAGE per index
// Untuk pake PAGE per index
PageController controller = PageController();
void _scrollToIndex2(int index) {
controller.animateToPage(index,
......@@ -62,26 +62,32 @@ class _AboutUsState extends State<AboutUs> {
appBar: ResponsiveWidget.isSmallScreen(context)
? AppBarKecil()
: AppbarHomeLarge(screenSize, context, Colors.black, Colors.blue,
Colors.black, Colors.black, Colors.black),
Colors.black, Colors.black, Colors.black),
drawer: const DrawerMedApp(),
body: ResponsiveWidget.isSmallScreen(context)
? Stack(
children: [
Title(
color: Colors.white,
child: ListView(
scrollDirection: Axis.vertical,
controller: controller2,
children: [
SmallHome1(wijet: Button_scroll_small()),
SmallHome2(),
SmallHome3(),
SmallHome4(),
ContactUs2_small(),
FooterSmall(),
],
),
FutureBuilder<dynamic>(
future: getSettingDesc2(),
builder: (BuildContext context, AsyncSnapshot snapshot) {
var pgm = snapshot.data[0];
return Title(
title: pgm['title'],
color: Colors.white,
child: ListView(
scrollDirection: Axis.vertical,
controller: controller2,
children: [
SmallHome1(wijet: Button_scroll_small()),
SmallHome2(),
SmallHome3(),
SmallHome4(),
ContactUs2_small(),
FooterSmall(),
],
),
);
},
),
ScrollUpButton(controller2),
],
......@@ -113,7 +119,6 @@ class _AboutUsState extends State<AboutUs> {
ScrollUpButton(controller2),
],
),
);
}
......
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:medapp_eksad/api/setting_api.dart';
import 'package:medapp_eksad/appbar/appbar_home.dart';
import 'package:medapp_eksad/screen_small/small_contact/small_contact_us1.dart';
import 'package:medapp_eksad/screen_small/small_contact/small_contact_us2.dart';
......@@ -6,6 +8,7 @@ import 'package:medapp_eksad/screen_small/small_footer.dart';
import 'package:medapp_eksad/screen/contact_us/contact_us1.dart';
import 'package:medapp_eksad/screen/contact_us/contact_us2.dart';
import 'package:medapp_eksad/screen/footer.dart';
import 'package:medapp_eksad/widget/Scroll_top.dart';
import 'package:medapp_eksad/widget/drawer.dart';
import 'package:medapp_eksad/widget/responsive.dart';
import 'package:medapp_eksad/widget/whatsapp.dart';
......@@ -26,10 +29,26 @@ class ContactUs extends StatefulWidget {
}
class _ContactUsState extends State<ContactUs> {
// Untuk pake PAGE per index
PageController controller = PageController();
void _scrollToIndex2(int index) {
controller.animateToPage(index,
duration: const Duration(seconds: 2),
curve: Curves.fastLinearToSlowEaseIn);
}
// Untuk pake LIST per height container
ScrollController controller2 = ScrollController();
void _scrollToIndex(double index) {
controller2.animateTo(index,
duration: const Duration(seconds: 1),
curve: Curves.fastLinearToSlowEaseIn);
}
final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>();
@override
Widget build(BuildContext context) {
setPageTitle('Contact Us', context);
// setPageTitle('Contact Us', context);
var screenSize = MediaQuery.of(context).size;
return Scaffold(
key: _scaffoldKey,
......@@ -39,22 +58,86 @@ class _ContactUsState extends State<ContactUs> {
Colors.black, Colors.black, Colors.blue),
drawer: const DrawerMedApp(),
body: ResponsiveWidget.isSmallScreen(context)
? ListView(
children: const [
ContactUs1_small(),
ContactUs2_small(),
FooterSmall(),
? Stack(
children: [
FutureBuilder<dynamic>(
future: getSettingDesc2(),
builder: (BuildContext context, AsyncSnapshot snapshot) {
var pgm = snapshot.data[0];
return Title(
title: pgm['title'],
color: Colors.white,
child: ListView(
scrollDirection: Axis.vertical,
controller: controller2,
children: [
ContactUs1_small(wijet: Button_scroll_small()),
ContactUs2_small(),
FooterSmall(),
],
),
);
},
),
ScrollUpButton(controller2),
],
)
: ListView(
: Stack(
children: [
ContactUs1(),
ContactUs2(),
Footer(),
FutureBuilder<dynamic>(
future: getSettingDesc2(),
builder: (BuildContext context, AsyncSnapshot snapshot) {
var pgm = snapshot.data[0];
return Title(
title: pgm['title'],
color: Colors.white,
child: ListView(
scrollDirection: Axis.vertical,
controller: controller2,
children: [
ContactUs1(wijet: Button_scroll()),
ContactUs2(),
Footer(),
],
),
);
},
),
ScrollUpButton(controller2),
],
),
floatingActionButtonLocation: FloatingActionButtonLocation.endFloat,
floatingActionButton: WAChat()
floatingActionButton: WAChat());
}
ElevatedButton Button_scroll() {
return ElevatedButton(
onPressed: () {
_scrollToIndex(3780);
},
style: ElevatedButton.styleFrom(
primary: const Color(0xff1e5ea8),
),
child: Text(
'CONTACT US',
style: GoogleFonts.poppins(
fontSize: 17, letterSpacing: 2, fontWeight: FontWeight.w500),
),
);
}
ElevatedButton Button_scroll_small() {
return ElevatedButton(
onPressed: () {
_scrollToIndex(5410);
},
style: ElevatedButton.styleFrom(
primary: const Color(0xff1e5ea8), fixedSize: const Size(50, 20)),
child: Text(
'CONTACT US',
style: GoogleFonts.poppins(
fontSize: 15, letterSpacing: 1.5, fontWeight: FontWeight.w500),
),
);
}
......
......@@ -2,7 +2,8 @@ import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
class ContactUs1 extends StatefulWidget {
const ContactUs1({Key? key}) : super(key: key);
ContactUs1({Key? key, required this.wijet}) : super(key: key);
final Widget wijet;
@override
State<ContactUs1> createState() => _ContactUsState();
......
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:medapp_eksad/api/setting_api.dart';
import 'package:medapp_eksad/appbar/appbar_home.dart';
import 'package:medapp_eksad/screen/contact_us/contact_us2.dart';
import 'package:medapp_eksad/screen/footer.dart';
......@@ -8,6 +10,7 @@ import 'package:medapp_eksad/screen/solution/our_solution3.dart';
import 'package:medapp_eksad/screen_small/small_footer.dart';
import 'package:medapp_eksad/screen_small/small_solution/small_solution1.dart';
import 'package:medapp_eksad/screen_small/small_solution/small_solution2.dart';
import 'package:medapp_eksad/widget/Scroll_top.dart';
import 'package:medapp_eksad/widget/componen.dart';
import 'package:medapp_eksad/widget/drawer.dart';
import 'package:medapp_eksad/widget/responsive.dart';
......@@ -39,7 +42,7 @@ class _SolutionsState extends State<Solutions> {
@override
Widget build(BuildContext context) {
setPageTitle('MeddApp Solutions', context);
// setPageTitle('MeddApp Solutions', context);
var screenSize = MediaQuery.of(context).size;
return Scaffold(
key: _scaffoldKey,
......@@ -50,22 +53,55 @@ class _SolutionsState extends State<Solutions> {
Colors.blue, Colors.black, Colors.black),
drawer: const DrawerMedApp(),
body: ResponsiveWidget.isSmallScreen(context)
? ListView(
children: const [
SmallOurSolution(),
SmallOurSolution2(),
FooterSmall(),
? Stack(
children: [
FutureBuilder<dynamic>(
future: getSettingDesc2(),
builder: (BuildContext context, AsyncSnapshot snapshot) {
var pgm = snapshot.data[0];
return Title(
title: pgm['title'],
color: Colors.white,
child: ListView(
scrollDirection: Axis.vertical,
controller: controller2,
children: [
SmallOurSolution(wijet: Button_scroll()),
SmallOurSolution2(),
FooterSmall(),
],
),
);
},
),
ScrollUpButton(controller2),
],
)
: ListView(
controller: controller2,
: Stack(
children: [
OurSolution(
button: ButtonSolution(context),
FutureBuilder<dynamic>(
future: getSettingDesc2(),
builder: (BuildContext context, AsyncSnapshot snapshot) {
var pgm = snapshot.data[0];
return Title(
title: pgm['title'],
color: Colors.white,
child: ListView(
controller: controller2,
children: [
OurSolution(
wijet: Button_scroll(),
button: ButtonSolution(context),
),
OurSolution2(),
ContactUs2(),
Footer(),
],
),
);
},
),
OurSolution2(),
ContactUs2(),
Footer(),
ScrollUpButton(controller2),
],
),
);
......@@ -95,6 +131,37 @@ class _SolutionsState extends State<Solutions> {
);
}
ElevatedButton Button_scroll() {
return ElevatedButton(
onPressed: () {
_scrollToIndex(3780);
},
style: ElevatedButton.styleFrom(
primary: const Color(0xff1e5ea8),
),
child: Text(
'CONTACT US',
style: GoogleFonts.poppins(
fontSize: 17, letterSpacing: 2, fontWeight: FontWeight.w500),
),
);
}
ElevatedButton Button_scroll_small() {
return ElevatedButton(
onPressed: () {
_scrollToIndex(5410);
},
style: ElevatedButton.styleFrom(
primary: const Color(0xff1e5ea8), fixedSize: const Size(50, 20)),
child: Text(
'CONTACT US',
style: GoogleFonts.poppins(
fontSize: 15, letterSpacing: 1.5, fontWeight: FontWeight.w500),
),
);
}
AppBar AppBarKecil() {
return AppBar(
leading: IconButton(
......
......@@ -2,11 +2,14 @@ import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:show_up_animation/show_up_animation.dart';
class OurSolution extends StatelessWidget {
const OurSolution({Key? key,required this.button}) : super(key: key);
OurSolution({
Key? key,
required this.button,
required this.wijet,
}) : super(key: key);
final Widget button;
final Widget wijet;
@override
Widget build(BuildContext context) {
......
......@@ -3,7 +3,8 @@ import 'package:google_fonts/google_fonts.dart';
class ContactUs1_small extends StatefulWidget {
const ContactUs1_small({Key? key}) : super(key: key);
ContactUs1_small({Key? key, required this.wijet}) : super(key: key);
final Widget wijet;
@override
State<ContactUs1_small> createState() => _ContactUsState();
......
......@@ -3,7 +3,8 @@ import 'package:google_fonts/google_fonts.dart';
import 'package:show_up_animation/show_up_animation.dart';
class SmallOurSolution extends StatefulWidget {
const SmallOurSolution({Key? key}) : super(key: key);
SmallOurSolution({Key? key, required this.wijet}) : super(key: key);
final Widget wijet;
@override
State<SmallOurSolution> createState() => _SmallOurSolutionState();
......@@ -56,7 +57,7 @@ class _SmallOurSolutionState extends State<SmallOurSolution> {
style: GoogleFonts.poppins(
fontSize: 34,
fontWeight: FontWeight.bold,
color: Colors.black87),
color: Colors.white),
textAlign: TextAlign.center,
),
),
......@@ -76,7 +77,7 @@ class _SmallOurSolutionState extends State<SmallOurSolution> {
letterSpacing: 1.8,
height: 1.4,
fontWeight: FontWeight.bold,
color: Colors.black87),
color: Colors.white),
textAlign: TextAlign.center,
),
),
......
......@@ -25,7 +25,7 @@ class _DemoUserState extends State<DemoUser> {
final GlobalKey<ScaffoldState> _scaffoldKey = new GlobalKey<ScaffoldState>();
@override
Widget build(BuildContext context) {
setPageTitle('Free Demo Medapp', context);
// setPageTitle('Free Demo Medapp', context);
var screenSize = MediaQuery.of(context).size;
return Scaffold(
key: _scaffoldKey,
......
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