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
bbe60556
Commit
bbe60556
authored
Aug 30, 2022
by
r.manan@eksad.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
home: floating WA
parent
14c7a855
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
127 additions
and
12 deletions
+127
-12
homepage.dart
lib/homepage.dart
+2
-0
contact_us.dart
lib/screen/contact_us/contact_us.dart
+23
-12
whatsapp.dart
lib/widget/whatsapp.dart
+59
-0
pubspec.lock
pubspec.lock
+42
-0
pubspec.yaml
pubspec.yaml
+1
-0
No files found.
lib/homepage.dart
View file @
bbe60556
...
@@ -4,6 +4,7 @@ import 'package:medapp_eksad/screen/footer.dart';
...
@@ -4,6 +4,7 @@ import 'package:medapp_eksad/screen/footer.dart';
import
'package:medapp_eksad/screen/home/home2.dart'
;
import
'package:medapp_eksad/screen/home/home2.dart'
;
import
'package:medapp_eksad/screen/home/home3.dart'
;
import
'package:medapp_eksad/screen/home/home3.dart'
;
import
'package:medapp_eksad/widget/responsive.dart'
;
import
'package:medapp_eksad/widget/responsive.dart'
;
import
'package:medapp_eksad/widget/whatsapp.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter/services.dart'
;
void
setPageTitle
(
String
title
,
BuildContext
context
)
{
void
setPageTitle
(
String
title
,
BuildContext
context
)
{
...
@@ -28,6 +29,7 @@ class _HomePageState extends State<HomePage> {
...
@@ -28,6 +29,7 @@ class _HomePageState extends State<HomePage> {
var
screenSize
=
MediaQuery
.
of
(
context
).
size
;
var
screenSize
=
MediaQuery
.
of
(
context
).
size
;
return
Scaffold
(
return
Scaffold
(
key:
_scaffoldKey
,
key:
_scaffoldKey
,
floatingActionButton:
WAChat
(),
appBar:
ResponsiveWidget
.
isSmallScreen
(
context
)
appBar:
ResponsiveWidget
.
isSmallScreen
(
context
)
?
AppBarKecil
()
?
AppBarKecil
()
:
AppbarHomeLarge
(
screenSize
,
context
,
Colors
.
blue
,
Colors
.
blue
,
:
AppbarHomeLarge
(
screenSize
,
context
,
Colors
.
blue
,
Colors
.
blue
,
...
...
lib/screen/contact_us/contact_us.dart
View file @
bbe60556
...
@@ -4,6 +4,7 @@ import 'package:medapp_eksad/screen/contact_us/contact_us1.dart';
...
@@ -4,6 +4,7 @@ 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/contact_us/contact_us2.dart'
;
import
'package:medapp_eksad/screen/footer.dart'
;
import
'package:medapp_eksad/screen/footer.dart'
;
import
'package:medapp_eksad/widget/responsive.dart'
;
import
'package:medapp_eksad/widget/responsive.dart'
;
import
'package:medapp_eksad/widget/whatsapp.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter/services.dart'
;
void
setPageTitle
(
String
title
,
BuildContext
context
)
{
void
setPageTitle
(
String
title
,
BuildContext
context
)
{
...
@@ -27,18 +28,28 @@ class _ContactUsState extends State<ContactUs> {
...
@@ -27,18 +28,28 @@ class _ContactUsState extends State<ContactUs> {
setPageTitle
(
'Contact Us'
,
context
);
setPageTitle
(
'Contact Us'
,
context
);
var
screenSize
=
MediaQuery
.
of
(
context
).
size
;
var
screenSize
=
MediaQuery
.
of
(
context
).
size
;
return
Scaffold
(
return
Scaffold
(
key:
_scaffoldKey
,
key:
_scaffoldKey
,
appBar:
ResponsiveWidget
.
isSmallScreen
(
context
)
appBar:
ResponsiveWidget
.
isSmallScreen
(
context
)
?
AppBarKecil
()
?
AppBarKecil
()
:
AppbarHomeLarge
(
screenSize
,
context
,
Colors
.
black
,
Colors
.
black
,
:
AppbarHomeLarge
(
screenSize
,
context
,
Colors
.
black
,
Colors
.
black
,
Colors
.
black
,
Colors
.
black
,
Colors
.
blue
),
Colors
.
black
,
Colors
.
black
,
Colors
.
blue
),
body:
ListView
(
body:
ResponsiveWidget
.
isSmallScreen
(
context
)
children:
[
?
ListView
(
const
ContactUs1
(),
children:
[
ContactUs2
(),
const
ContactUs1
(),
const
Footer
(),
ContactUs2
(),
],
const
Footer
(),
),
],
)
:
ListView
(
children:
[
ContactUs1
(),
ContactUs2
(),
Footer
(),
],
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
endFloat
,
floatingActionButton:
WAChat
()
);
);
}
}
...
...
lib/widget/whatsapp.dart
0 → 100644
View file @
bbe60556
import
'package:flutter/material.dart'
;
import
'package:url_launcher/url_launcher.dart'
;
import
'package:spring/spring.dart'
;
class
WAChat
extends
StatelessWidget
{
WAChat
({
Key
?
key
})
:
super
(
key:
key
);
void
launchWhatsApp
({
required
final
int
phone
,
required
String
message
,
})
async
{
String
url
()
{
return
"https://api.whatsapp.com/send?phone=
$phone
&text=
${Uri.parse(message)}
"
;
}
if
(
await
canLaunch
(
url
()))
{
await
launch
(
url
());
}
else
{
throw
'Could not launch
${url()}
'
;
}
}
final
SpringController
springController
=
SpringController
(
initialAnim:
Motion
.
play
);
@override
Widget
build
(
BuildContext
context
)
{
return
FloatingActionButton
(
onPressed:
()
{
launchWhatsApp
(
phone:
6281807890777
,
message:
'Hallo, saya tertarik dengan produk EKSAD dan saya ingin tahu lebih lanjut tentang program Protalent'
);
},
backgroundColor:
Colors
.
green
,
child:
GestureDetector
(
onTap:
()
{
springController
.
play
(
motion:
Motion
.
reverse
,
animDuration:
const
Duration
(
milliseconds:
1000
),
curve:
Curves
.
easeInBack
,
delay:
const
Duration
(
milliseconds:
100
));
launchWhatsApp
(
phone:
6281807890777
,
message:
'Hallo, saya tertarik dengan produk EKSAD dan saya ingin tahu lebih lanjut tentang program Protalent'
);
},
child:
Spring
.
rotate
(
endAngle:
360
*
10
,
animDuration:
const
Duration
(
seconds:
3
*
10
),
springController:
springController
,
alignment:
Alignment
.
center
,
animStatus:
(
AnimStatus
status
)
{},
child:
const
Icon
(
Icons
.
whatsapp
,
size:
30
),
),
),
);
}
}
pubspec.lock
View file @
bbe60556
...
@@ -233,6 +233,13 @@ packages:
...
@@ -233,6 +233,13 @@ packages:
url: "https://pub.dartlang.org"
url: "https://pub.dartlang.org"
source: hosted
source: hosted
version: "2.1.2"
version: "2.1.2"
pedantic:
dependency: transitive
description:
name: pedantic
url: "https://pub.dartlang.org"
source: hosted
version: "1.11.1"
platform:
platform:
dependency: transitive
dependency: transitive
description:
description:
...
@@ -268,6 +275,13 @@ packages:
...
@@ -268,6 +275,13 @@ packages:
url: "https://pub.dartlang.org"
url: "https://pub.dartlang.org"
source: hosted
source: hosted
version: "0.7.0"
version: "0.7.0"
simple_animations:
dependency: transitive
description:
name: simple_animations
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.1"
sky_engine:
sky_engine:
dependency: transitive
dependency: transitive
description: flutter
description: flutter
...
@@ -280,6 +294,13 @@ packages:
...
@@ -280,6 +294,13 @@ packages:
url: "https://pub.dartlang.org"
url: "https://pub.dartlang.org"
source: hosted
source: hosted
version: "1.8.2"
version: "1.8.2"
spring:
dependency: "direct main"
description:
name: spring
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.2"
stack_trace:
stack_trace:
dependency: transitive
dependency: transitive
description:
description:
...
@@ -301,6 +322,20 @@ packages:
...
@@ -301,6 +322,20 @@ packages:
url: "https://pub.dartlang.org"
url: "https://pub.dartlang.org"
source: hosted
source: hosted
version: "1.1.0"
version: "1.1.0"
supercharged:
dependency: transitive
description:
name: supercharged
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
supercharged_dart:
dependency: transitive
description:
name: supercharged_dart
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
term_glyph:
term_glyph:
dependency: transitive
dependency: transitive
description:
description:
...
@@ -322,6 +357,13 @@ packages:
...
@@ -322,6 +357,13 @@ packages:
url: "https://pub.dartlang.org"
url: "https://pub.dartlang.org"
source: hosted
source: hosted
version: "1.3.1"
version: "1.3.1"
universal_platform:
dependency: transitive
description:
name: universal_platform
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0+1"
url_launcher:
url_launcher:
dependency: "direct main"
dependency: "direct main"
description:
description:
...
...
pubspec.yaml
View file @
bbe60556
...
@@ -45,6 +45,7 @@ dependencies:
...
@@ -45,6 +45,7 @@ dependencies:
cupertino_icons
:
^1.0.2
cupertino_icons
:
^1.0.2
show_up_animation
:
^2.0.0
show_up_animation
:
^2.0.0
http
:
^0.13.4
http
:
^0.13.4
spring
:
^2.0.2
dev_dependencies
:
dev_dependencies
:
flutter_test
:
flutter_test
:
...
...
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