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
f68daece
Commit
f68daece
authored
Oct 03, 2022
by
Budi Prasetyo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hilangin appbar pas discroll
parent
efdca11d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
230 additions
and
10 deletions
+230
-10
homepage.dart
lib/homepage.dart
+59
-4
about_us.dart
lib/screen/about_us.dart
+57
-2
contact_us.dart
lib/screen/contact_us/contact_us.dart
+57
-2
solution.dart
lib/screen/solution.dart
+57
-2
No files found.
lib/homepage.dart
View file @
f68daece
import
'package:flutter/material.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:google_fonts/google_fonts.dart'
;
import
'package:medapp_eksad/api/setting_api.dart'
;
import
'package:medapp_eksad/appbar/appbar_home.dart'
;
...
...
@@ -51,6 +52,55 @@ class _HomePageState extends State<HomePage> {
curve:
Curves
.
fastLinearToSlowEaseIn
);
}
bool
_showAppbar
=
true
;
//ScrollController controller2 = new ScrollController();
bool
_show
=
true
;
bool
isScrollingDown
=
false
;
@override
void
initState
()
{
super
.
initState
();
myScroll
();
}
@override
void
dispose
()
{
super
.
dispose
();
controller2
.
removeListener
(()
{});
super
.
dispose
();
}
void
showBottomBar
()
{
setState
(()
{
_show
=
true
;
});
}
void
hideBottomBar
()
{
setState
(()
{
_show
=
false
;
});
}
void
myScroll
()
async
{
controller2
.
addListener
(()
{
if
(
controller2
.
position
.
userScrollDirection
==
ScrollDirection
.
reverse
)
{
if
(!
isScrollingDown
)
{
isScrollingDown
=
true
;
_showAppbar
=
false
;
hideBottomBar
();
}
}
if
(
controller2
.
position
.
userScrollDirection
==
ScrollDirection
.
forward
)
{
if
(
isScrollingDown
)
{
isScrollingDown
=
false
;
_showAppbar
=
true
;
showBottomBar
();
}
}
});
}
final
GlobalKey
<
ScaffoldState
>
_scaffoldKey
=
new
GlobalKey
<
ScaffoldState
>();
@override
Widget
build
(
BuildContext
context
)
{
...
...
@@ -59,10 +109,15 @@ class _HomePageState extends State<HomePage> {
return
Scaffold
(
key:
_scaffoldKey
,
floatingActionButton:
WAChat
(),
appBar:
ResponsiveWidget
.
isSmallScreen
(
context
)
?
AppBarKecil
()
:
AppbarHomeLarge
(
screenSize
,
context
,
Colors
.
blue
,
Colors
.
black
,
Colors
.
black
,
Colors
.
black
,
Colors
.
black
),
appBar:
_showAppbar
?
ResponsiveWidget
.
isSmallScreen
(
context
)
?
AppBarKecil
()
:
AppbarHomeLarge
(
screenSize
,
context
,
Colors
.
blue
,
Colors
.
black
,
Colors
.
black
,
Colors
.
black
,
Colors
.
black
)
:
PreferredSize
(
child:
Container
(),
preferredSize:
Size
(
0.0
,
0.0
),
),
drawer:
const
DrawerMedApp
(),
body:
ResponsiveWidget
.
isSmallScreen
(
context
)
?
Stack
(
...
...
lib/screen/about_us.dart
View file @
f68daece
import
'package:flutter/material.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:google_fonts/google_fonts.dart'
;
import
'package:medapp_eksad/api/setting_api.dart'
;
import
'package:medapp_eksad/appbar/appbar_home.dart'
;
...
...
@@ -51,6 +52,55 @@ class _AboutUsState extends State<AboutUs> {
curve:
Curves
.
fastLinearToSlowEaseIn
);
}
bool
_showAppbar
=
true
;
//ScrollController controller2 = new ScrollController();
bool
_show
=
true
;
bool
isScrollingDown
=
false
;
@override
void
initState
()
{
super
.
initState
();
myScroll
();
}
@override
void
dispose
()
{
super
.
dispose
();
controller2
.
removeListener
(()
{});
super
.
dispose
();
}
void
showBottomBar
()
{
setState
(()
{
_show
=
true
;
});
}
void
hideBottomBar
()
{
setState
(()
{
_show
=
false
;
});
}
void
myScroll
()
async
{
controller2
.
addListener
(()
{
if
(
controller2
.
position
.
userScrollDirection
==
ScrollDirection
.
reverse
)
{
if
(!
isScrollingDown
)
{
isScrollingDown
=
true
;
_showAppbar
=
false
;
hideBottomBar
();
}
}
if
(
controller2
.
position
.
userScrollDirection
==
ScrollDirection
.
forward
)
{
if
(
isScrollingDown
)
{
isScrollingDown
=
false
;
_showAppbar
=
true
;
showBottomBar
();
}
}
});
}
final
GlobalKey
<
ScaffoldState
>
_scaffoldKey
=
new
GlobalKey
<
ScaffoldState
>();
@override
Widget
build
(
BuildContext
context
)
{
...
...
@@ -59,10 +109,15 @@ class _AboutUsState extends State<AboutUs> {
return
Scaffold
(
key:
_scaffoldKey
,
floatingActionButton:
WAChat
(),
appBar:
ResponsiveWidget
.
isSmallScreen
(
context
)
appBar:
_showAppbar
?
ResponsiveWidget
.
isSmallScreen
(
context
)
?
AppBarKecil
()
:
AppbarHomeLarge
(
screenSize
,
context
,
Colors
.
black
,
Colors
.
blue
,
Colors
.
black
,
Colors
.
black
,
Colors
.
black
),
Colors
.
black
,
Colors
.
black
,
Colors
.
black
)
:
PreferredSize
(
child:
Container
(),
preferredSize:
Size
(
0.0
,
0.0
),
),
drawer:
const
DrawerMedApp
(),
body:
ResponsiveWidget
.
isSmallScreen
(
context
)
?
Stack
(
...
...
lib/screen/contact_us/contact_us.dart
View file @
f68daece
import
'package:flutter/material.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:google_fonts/google_fonts.dart'
;
import
'package:medapp_eksad/api/setting_api.dart'
;
import
'package:medapp_eksad/appbar/appbar_home.dart'
;
...
...
@@ -45,6 +46,55 @@ class _ContactUsState extends State<ContactUs> {
curve:
Curves
.
fastLinearToSlowEaseIn
);
}
bool
_showAppbar
=
true
;
//ScrollController controller2 = new ScrollController();
bool
_show
=
true
;
bool
isScrollingDown
=
false
;
@override
void
initState
()
{
super
.
initState
();
myScroll
();
}
@override
void
dispose
()
{
super
.
dispose
();
controller2
.
removeListener
(()
{});
super
.
dispose
();
}
void
showBottomBar
()
{
setState
(()
{
_show
=
true
;
});
}
void
hideBottomBar
()
{
setState
(()
{
_show
=
false
;
});
}
void
myScroll
()
async
{
controller2
.
addListener
(()
{
if
(
controller2
.
position
.
userScrollDirection
==
ScrollDirection
.
reverse
)
{
if
(!
isScrollingDown
)
{
isScrollingDown
=
true
;
_showAppbar
=
false
;
hideBottomBar
();
}
}
if
(
controller2
.
position
.
userScrollDirection
==
ScrollDirection
.
forward
)
{
if
(
isScrollingDown
)
{
isScrollingDown
=
false
;
_showAppbar
=
true
;
showBottomBar
();
}
}
});
}
final
GlobalKey
<
ScaffoldState
>
_scaffoldKey
=
GlobalKey
<
ScaffoldState
>();
@override
Widget
build
(
BuildContext
context
)
{
...
...
@@ -52,10 +102,15 @@ class _ContactUsState extends State<ContactUs> {
var
screenSize
=
MediaQuery
.
of
(
context
).
size
;
return
Scaffold
(
key:
_scaffoldKey
,
appBar:
ResponsiveWidget
.
isSmallScreen
(
context
)
appBar:
_showAppbar
?
ResponsiveWidget
.
isSmallScreen
(
context
)
?
AppBarKecil
()
:
AppbarHomeLarge
(
screenSize
,
context
,
Colors
.
black
,
Colors
.
black
,
Colors
.
black
,
Colors
.
black
,
Colors
.
blue
),
Colors
.
black
,
Colors
.
black
,
Colors
.
blue
)
:
PreferredSize
(
child:
Container
(),
preferredSize:
Size
(
0.0
,
0.0
),
),
drawer:
const
DrawerMedApp
(),
body:
ResponsiveWidget
.
isSmallScreen
(
context
)
?
Stack
(
...
...
lib/screen/solution.dart
View file @
f68daece
import
'package:flutter/material.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:google_fonts/google_fonts.dart'
;
import
'package:medapp_eksad/api/setting_api.dart'
;
import
'package:medapp_eksad/appbar/appbar_home.dart'
;
...
...
@@ -40,6 +41,55 @@ class _SolutionsState extends State<Solutions> {
curve:
Curves
.
fastLinearToSlowEaseIn
);
}
bool
_showAppbar
=
true
;
//ScrollController controller2 = new ScrollController();
bool
_show
=
true
;
bool
isScrollingDown
=
false
;
@override
void
initState
()
{
super
.
initState
();
myScroll
();
}
@override
void
dispose
()
{
super
.
dispose
();
controller2
.
removeListener
(()
{});
super
.
dispose
();
}
void
showBottomBar
()
{
setState
(()
{
_show
=
true
;
});
}
void
hideBottomBar
()
{
setState
(()
{
_show
=
false
;
});
}
void
myScroll
()
async
{
controller2
.
addListener
(()
{
if
(
controller2
.
position
.
userScrollDirection
==
ScrollDirection
.
reverse
)
{
if
(!
isScrollingDown
)
{
isScrollingDown
=
true
;
_showAppbar
=
false
;
hideBottomBar
();
}
}
if
(
controller2
.
position
.
userScrollDirection
==
ScrollDirection
.
forward
)
{
if
(
isScrollingDown
)
{
isScrollingDown
=
false
;
_showAppbar
=
true
;
showBottomBar
();
}
}
});
}
@override
Widget
build
(
BuildContext
context
)
{
setPageTitle
(
'Our Solutions'
,
context
);
...
...
@@ -47,10 +97,15 @@ class _SolutionsState extends State<Solutions> {
return
Scaffold
(
key:
_scaffoldKey
,
floatingActionButton:
WAChat
(),
appBar:
ResponsiveWidget
.
isSmallScreen
(
context
)
appBar:
_showAppbar
?
ResponsiveWidget
.
isSmallScreen
(
context
)
?
AppBarKecil
()
:
AppbarHomeLarge
(
screenSize
,
context
,
Colors
.
black
,
Colors
.
black
,
Colors
.
blue
,
Colors
.
black
,
Colors
.
black
),
Colors
.
blue
,
Colors
.
black
,
Colors
.
black
)
:
PreferredSize
(
child:
Container
(),
preferredSize:
Size
(
0.0
,
0.0
),
),
drawer:
const
DrawerMedApp
(),
body:
ResponsiveWidget
.
isSmallScreen
(
context
)
?
Stack
(
...
...
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