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
5c18e929
Commit
5c18e929
authored
Sep 23, 2022
by
Fikri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
menambahkan setting
parent
c07c7e6f
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
663 additions
and
51 deletions
+663
-51
setting_api.dart
lib/api/setting_api.dart
+63
-0
admin_setting.dart
lib/dashboard/admin/admin_setting.dart
+400
-0
main_dashboard_admin.dart
lib/dashboard/admin/main_dashboard_admin.dart
+3
-10
footer.dart
lib/screen/footer.dart
+64
-29
pubspec.lock
pubspec.lock
+131
-12
pubspec.yaml
pubspec.yaml
+2
-0
No files found.
lib/api/setting_api.dart
0 → 100644
View file @
5c18e929
import
'dart:convert'
;
import
'package:http/http.dart'
as
http
;
var
cmd
=
'https://dmsdev-api.eksad.com/gateway/medapp/v1/cmd'
;
var
qry
=
'https://dmsdev-api.eksad.com/gateway/medapp/v1/qry'
;
Future
<
bool
>
createSetting
(
im
,
tt
,
em
,
no
)
async
{
final
response
=
await
http
.
post
(
Uri
.
parse
(
'
$cmd
/setting/saveSetting'
),
body:
jsonEncode
(
{
"image"
:
im
,
"title"
:
tt
,
// "tagline": tl,
"email"
:
em
,
"no"
:
no
,
}),
headers:
{
'Content-type'
:
'application/json; charset=UTF-8'
,
});
if
(
response
.
statusCode
==
200
)
{
return
true
;
}
else
{
return
false
;
}
}
Future
<
bool
>
updateSetting
(
id
,
image
,
name
,
title
,
email
,
no
,)
async
{
final
response
=
await
http
.
put
(
Uri
.
parse
(
'
$cmd
/setting/updateSetting'
),
body:
jsonEncode
({
"idsetting"
:
id
,
"image"
:
image
,
"name"
:
name
,
"title"
:
title
,
// "tagline": tagline,
"email"
:
email
,
"no"
:
no
,
"idrole"
:
"R001"
,
}),
headers:
{
'Content-type'
:
'application/json; charset=UTF-8'
,
});
if
(
response
.
statusCode
==
200
)
{
return
true
;
}
else
{
return
false
;
}
}
Future
<
List
<
dynamic
>>
getSetting
()
async
{
var
response
=
await
http
.
get
(
Uri
.
parse
(
'
$cmd
/setting/getAllSettingByIdRole'
));
return
jsonDecode
(
response
.
body
)[
'data'
];
}
Future
<
List
<
dynamic
>>
getSettingDesc
()
async
{
var
response
=
await
http
.
get
(
Uri
.
parse
(
'
$qry
/setting/getSettingByIdDesc'
));
return
jsonDecode
(
response
.
body
)[
'data'
];
}
lib/dashboard/admin/admin_setting.dart
0 → 100644
View file @
5c18e929
This diff is collapsed.
Click to expand it.
lib/dashboard/admin/main_dashboard_admin.dart
View file @
5c18e929
...
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
...
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import
'package:easy_sidemenu/easy_sidemenu.dart'
;
import
'package:easy_sidemenu/easy_sidemenu.dart'
;
import
'package:medapp_eksad/dashboard/admin/admin_contact.dart'
;
import
'package:medapp_eksad/dashboard/admin/admin_contact.dart'
;
import
'package:medapp_eksad/dashboard/admin/admin_dashboard.dart'
;
import
'package:medapp_eksad/dashboard/admin/admin_dashboard.dart'
;
import
'package:medapp_eksad/dashboard/admin/admin_setting.dart'
;
import
'package:medapp_eksad/dashboard/admin/admin_sosmed.dart'
;
import
'package:medapp_eksad/dashboard/admin/admin_sosmed.dart'
;
import
'package:medapp_eksad/dashboard/admin/admin_userControl.dart'
;
import
'package:medapp_eksad/dashboard/admin/admin_userControl.dart'
;
import
'package:medapp_eksad/dashboard/admin/admin_whatsapp.dart'
;
import
'package:medapp_eksad/dashboard/admin/admin_whatsapp.dart'
;
...
@@ -123,7 +124,7 @@ class _DashboardAdminState extends State<DashboardAdmin> {
...
@@ -123,7 +124,7 @@ class _DashboardAdminState extends State<DashboardAdmin> {
),
),
SideMenuItem
(
SideMenuItem
(
priority:
1
,
priority:
1
,
title:
'
Files
'
,
title:
'
Setting
'
,
onTap:
()
{
onTap:
()
{
page
.
jumpToPage
(
1
);
page
.
jumpToPage
(
1
);
},
},
...
@@ -159,15 +160,7 @@ class _DashboardAdminState extends State<DashboardAdmin> {
...
@@ -159,15 +160,7 @@ class _DashboardAdminState extends State<DashboardAdmin> {
controller:
page
,
controller:
page
,
children:
[
children:
[
const
Dashboard1
(),
const
Dashboard1
(),
Container
(
SettingDashboard
(),
color:
Colors
.
white
,
child:
const
Center
(
child:
Text
(
'Files'
,
style:
TextStyle
(
fontSize:
35
),
),
),
),
SosmedDashboard
(),
SosmedDashboard
(),
//Dashboard3(),
//Dashboard3(),
Dashboard4
(),
Dashboard4
(),
...
...
lib/screen/footer.dart
View file @
5c18e929
...
@@ -3,6 +3,8 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
...
@@ -3,6 +3,8 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import
'package:google_fonts/google_fonts.dart'
;
import
'package:google_fonts/google_fonts.dart'
;
import
'package:url_launcher/url_launcher.dart'
;
import
'package:url_launcher/url_launcher.dart'
;
import
'../api/setting_api.dart'
;
class
Footer
extends
StatelessWidget
{
class
Footer
extends
StatelessWidget
{
const
Footer
({
Key
?
key
})
:
super
(
key:
key
);
const
Footer
({
Key
?
key
})
:
super
(
key:
key
);
...
@@ -11,7 +13,7 @@ class Footer extends StatelessWidget {
...
@@ -11,7 +13,7 @@ class Footer extends StatelessWidget {
var
screenSize
=
MediaQuery
.
of
(
context
).
size
;
var
screenSize
=
MediaQuery
.
of
(
context
).
size
;
return
Container
(
return
Container
(
width:
screenSize
.
width
,
width:
screenSize
.
width
,
height:
screenSize
.
height
*
0.
78
,
height:
screenSize
.
height
*
0.
80
,
color:
Colors
.
white
,
color:
Colors
.
white
,
child:
Column
(
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
...
@@ -25,7 +27,7 @@ class Footer extends StatelessWidget {
...
@@ -25,7 +27,7 @@ class Footer extends StatelessWidget {
),
),
Container
(
Container
(
width:
screenSize
.
width
,
width:
screenSize
.
width
,
height:
screenSize
.
height
*
0.5
5
,
height:
screenSize
.
height
*
0.5
0
,
child:
Row
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceEvenly
,
mainAxisAlignment:
MainAxisAlignment
.
spaceEvenly
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
...
@@ -212,7 +214,9 @@ class Footer extends StatelessWidget {
...
@@ -212,7 +214,9 @@ class Footer extends StatelessWidget {
letterSpacing:
1.5
),
letterSpacing:
1.5
),
),
),
),
),
SizedBox
(
height:
10
,),
SizedBox
(
height:
10
,
),
Container
(
Container
(
height:
screenSize
.
height
*
0.04
,
height:
screenSize
.
height
*
0.04
,
child:
itemBawah
(
child:
itemBawah
(
...
@@ -248,7 +252,7 @@ class Footer extends StatelessWidget {
...
@@ -248,7 +252,7 @@ class Footer extends StatelessWidget {
)),
)),
Container
(
Container
(
width:
screenSize
.
width
*
0.25
,
width:
screenSize
.
width
*
0.25
,
height:
screenSize
.
height
*
0.
5
5
,
height:
screenSize
.
height
*
0.
7
5
,
//color: Colors.blue,
//color: Colors.blue,
child:
Column
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
...
@@ -266,30 +270,8 @@ class Footer extends StatelessWidget {
...
@@ -266,30 +270,8 @@ class Footer extends StatelessWidget {
),
),
),
),
const
SizedBox
(
height:
8
),
const
SizedBox
(
height:
8
),
Container
(
TelphoneApi
(),
width:
screenSize
.
width
*
0.2
,
child:
ListTile
(
leading:
const
Icon
(
Icons
.
phone
,
size:
22
,
),
title:
TextButton
(
onPressed:
()
{
launch
(
'tel:02157958040'
);
},
child:
Container
(
height:
screenSize
.
height
*
0.04
,
child:
Text
(
'(021) 5795 - 8040'
,
style:
GoogleFonts
.
poppins
(
fontSize:
16
,
color:
Colors
.
black87
,
),
),
),
),
),
),
Container
(
Container
(
width:
screenSize
.
width
*
0.2
,
width:
screenSize
.
width
*
0.2
,
child:
ListTile
(
child:
ListTile
(
...
@@ -383,3 +365,56 @@ class itemBawah extends StatelessWidget {
...
@@ -383,3 +365,56 @@ class itemBawah extends StatelessWidget {
));
));
}
}
}
}
class
TelphoneApi
extends
StatefulWidget
{
const
TelphoneApi
({
Key
?
key
})
:
super
(
key:
key
);
@override
State
<
TelphoneApi
>
createState
()
=>
_TelphoneApiState
();
}
class
_TelphoneApiState
extends
State
<
TelphoneApi
>
{
String
no
=
''
;
@override
Widget
build
(
BuildContext
context
)
{
var
screenSize
=
MediaQuery
.
of
(
context
).
size
;
return
FutureBuilder
<
List
<
dynamic
>>(
future:
getSettingDesc
(),
builder:
(
BuildContext
context
,
AsyncSnapshot
snapshot
)
{
var
pgm
=
snapshot
.
data
[
0
];
if
(
snapshot
.
hasError
||
snapshot
.
data
==
null
||
snapshot
.
connectionState
==
ConnectionState
.
waiting
)
{
return
const
CircularProgressIndicator
();
}
return
Container
(
width:
screenSize
.
width
*
0.01
,
child:
ListTile
(
leading:
const
Icon
(
Icons
.
phone
,
size:
23
,
color:
Colors
.
black
,
),
title:
TextButton
(
onPressed:
()
{
no
=
pgm
[
'no'
];
//02157958040
launch
(
'tel:
$no
'
);
},
child:
Text
(
pgm
[
'no'
],
style:
GoogleFonts
.
poppins
(
fontSize:
16
,
color:
Colors
.
black87
,
letterSpacing:
1.5
),
)),
),
);
},
);
}
}
pubspec.lock
View file @
5c18e929
...
@@ -7,7 +7,7 @@ packages:
...
@@ -7,7 +7,7 @@ packages:
name: async
name: async
url: "https://pub.dartlang.org"
url: "https://pub.dartlang.org"
source: hosted
source: hosted
version: "2.
9.0
"
version: "2.
8.2
"
badges:
badges:
dependency: transitive
dependency: transitive
description:
description:
...
@@ -42,14 +42,21 @@ packages:
...
@@ -42,14 +42,21 @@ packages:
name: characters
name: characters
url: "https://pub.dartlang.org"
url: "https://pub.dartlang.org"
source: hosted
source: hosted
version: "1.2.1"
version: "1.2.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.1"
clock:
clock:
dependency: transitive
dependency: transitive
description:
description:
name: clock
name: clock
url: "https://pub.dartlang.org"
url: "https://pub.dartlang.org"
source: hosted
source: hosted
version: "1.1.
1
"
version: "1.1.
0
"
collection:
collection:
dependency: transitive
dependency: transitive
description:
description:
...
@@ -57,6 +64,13 @@ packages:
...
@@ -57,6 +64,13 @@ packages:
url: "https://pub.dartlang.org"
url: "https://pub.dartlang.org"
source: hosted
source: hosted
version: "1.16.0"
version: "1.16.0"
cross_file:
dependency: transitive
description:
name: cross_file
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.3+2"
crypto:
crypto:
dependency: transitive
dependency: transitive
description:
description:
...
@@ -98,7 +112,7 @@ packages:
...
@@ -98,7 +112,7 @@ packages:
name: fake_async
name: fake_async
url: "https://pub.dartlang.org"
url: "https://pub.dartlang.org"
source: hosted
source: hosted
version: "1.3.
1
"
version: "1.3.
0
"
ffi:
ffi:
dependency: transitive
dependency: transitive
description:
description:
...
@@ -113,6 +127,55 @@ packages:
...
@@ -113,6 +127,55 @@ packages:
url: "https://pub.dartlang.org"
url: "https://pub.dartlang.org"
source: hosted
source: hosted
version: "6.1.4"
version: "6.1.4"
file_picker:
dependency: "direct main"
description:
name: file_picker
url: "https://pub.dartlang.org"
source: hosted
version: "5.0.1"
firebase_auth:
dependency: "direct main"
description:
name: firebase_auth
url: "https://pub.dartlang.org"
source: hosted
version: "3.9.0"
firebase_auth_platform_interface:
dependency: transitive
description:
name: firebase_auth_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "6.8.0"
firebase_auth_web:
dependency: transitive
description:
name: firebase_auth_web
url: "https://pub.dartlang.org"
source: hosted
version: "4.4.1"
firebase_core:
dependency: "direct main"
description:
name: firebase_core
url: "https://pub.dartlang.org"
source: hosted
version: "1.22.0"
firebase_core_platform_interface:
dependency: transitive
description:
name: firebase_core_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "4.5.1"
firebase_core_web:
dependency: transitive
description:
name: firebase_core_web
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.2"
flutter:
flutter:
dependency: "direct main"
dependency: "direct main"
description: flutter
description: flutter
...
@@ -125,6 +188,13 @@ packages:
...
@@ -125,6 +188,13 @@ packages:
url: "https://pub.dartlang.org"
url: "https://pub.dartlang.org"
source: hosted
source: hosted
version: "2.0.1"
version: "2.0.1"
flutter_plugin_android_lifecycle:
dependency: transitive
description:
name: flutter_plugin_android_lifecycle
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.7"
flutter_test:
flutter_test:
dependency: "direct dev"
dependency: "direct dev"
description: flutter
description: flutter
...
@@ -177,6 +247,41 @@ packages:
...
@@ -177,6 +247,41 @@ packages:
url: "https://pub.dartlang.org"
url: "https://pub.dartlang.org"
source: hosted
source: hosted
version: "4.0.1"
version: "4.0.1"
image_picker:
dependency: "direct main"
description:
name: image_picker
url: "https://pub.dartlang.org"
source: hosted
version: "0.8.5+3"
image_picker_android:
dependency: transitive
description:
name: image_picker_android
url: "https://pub.dartlang.org"
source: hosted
version: "0.8.5+3"
image_picker_for_web:
dependency: transitive
description:
name: image_picker_for_web
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.8"
image_picker_ios:
dependency: transitive
description:
name: image_picker_ios
url: "https://pub.dartlang.org"
source: hosted
version: "0.8.6+1"
image_picker_platform_interface:
dependency: transitive
description:
name: image_picker_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.6.1"
intl:
intl:
dependency: "direct main"
dependency: "direct main"
description:
description:
...
@@ -204,28 +309,35 @@ packages:
...
@@ -204,28 +309,35 @@ packages:
name: matcher
name: matcher
url: "https://pub.dartlang.org"
url: "https://pub.dartlang.org"
source: hosted
source: hosted
version: "0.12.1
2
"
version: "0.12.1
1
"
material_color_utilities:
material_color_utilities:
dependency: transitive
dependency: transitive
description:
description:
name: material_color_utilities
name: material_color_utilities
url: "https://pub.dartlang.org"
url: "https://pub.dartlang.org"
source: hosted
source: hosted
version: "0.1.
5
"
version: "0.1.
4
"
meta:
meta:
dependency: transitive
dependency: transitive
description:
description:
name: meta
name: meta
url: "https://pub.dartlang.org"
url: "https://pub.dartlang.org"
source: hosted
source: hosted
version: "1.8.0"
version: "1.7.0"
nested:
dependency: transitive
description:
name: nested
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
path:
path:
dependency: transitive
dependency: transitive
description:
description:
name: path
name: path
url: "https://pub.dartlang.org"
url: "https://pub.dartlang.org"
source: hosted
source: hosted
version: "1.8.
2
"
version: "1.8.
1
"
path_provider:
path_provider:
dependency: transitive
dependency: transitive
description:
description:
...
@@ -303,6 +415,13 @@ packages:
...
@@ -303,6 +415,13 @@ packages:
url: "https://pub.dartlang.org"
url: "https://pub.dartlang.org"
source: hosted
source: hosted
version: "4.2.4"
version: "4.2.4"
provider:
dependency: "direct main"
description:
name: provider
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.3"
scaled_list:
scaled_list:
dependency: "direct main"
dependency: "direct main"
description:
description:
...
@@ -335,7 +454,7 @@ packages:
...
@@ -335,7 +454,7 @@ packages:
name: source_span
name: source_span
url: "https://pub.dartlang.org"
url: "https://pub.dartlang.org"
source: hosted
source: hosted
version: "1.
9.0
"
version: "1.
8.2
"
spring:
spring:
dependency: "direct main"
dependency: "direct main"
description:
description:
...
@@ -363,7 +482,7 @@ packages:
...
@@ -363,7 +482,7 @@ packages:
name: string_scanner
name: string_scanner
url: "https://pub.dartlang.org"
url: "https://pub.dartlang.org"
source: hosted
source: hosted
version: "1.1.
1
"
version: "1.1.
0
"
supercharged:
supercharged:
dependency: transitive
dependency: transitive
description:
description:
...
@@ -384,14 +503,14 @@ packages:
...
@@ -384,14 +503,14 @@ packages:
name: term_glyph
name: term_glyph
url: "https://pub.dartlang.org"
url: "https://pub.dartlang.org"
source: hosted
source: hosted
version: "1.2.
1
"
version: "1.2.
0
"
test_api:
test_api:
dependency: transitive
dependency: transitive
description:
description:
name: test_api
name: test_api
url: "https://pub.dartlang.org"
url: "https://pub.dartlang.org"
source: hosted
source: hosted
version: "0.4.
12
"
version: "0.4.
9
"
typed_data:
typed_data:
dependency: transitive
dependency: transitive
description:
description:
...
...
pubspec.yaml
View file @
5c18e929
...
@@ -38,6 +38,8 @@ dependencies:
...
@@ -38,6 +38,8 @@ dependencies:
easy_sidemenu
:
^0.3.1
easy_sidemenu
:
^0.3.1
form_validator
:
^1.0.0
form_validator
:
^1.0.0
form_field_validator
:
^1.0.1
form_field_validator
:
^1.0.1
image_picker
:
^0.8.5+3
file_picker
:
^5.0.1
flutter_web_plugins
:
flutter_web_plugins
:
sdk
:
flutter
sdk
:
flutter
...
...
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