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
94a257eb
Commit
94a257eb
authored
Sep 07, 2022
by
Budi Prasetyo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sosmed dashboard
parent
977a598d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
241 additions
and
28 deletions
+241
-28
admin_sosmed.dart
lib/dashboard/admin/admin_sosmed.dart
+230
-0
main_dashboard_admin.dart
lib/dashboard/admin/main_dashboard_admin.dart
+11
-28
No files found.
lib/dashboard/admin/admin_sosmed.dart
0 → 100644
View file @
94a257eb
import
'package:flutter/material.dart'
;
import
'package:font_awesome_flutter/font_awesome_flutter.dart'
;
import
'package:google_fonts/google_fonts.dart'
;
class
SosmedDashboard
extends
StatefulWidget
{
const
SosmedDashboard
({
Key
?
key
})
:
super
(
key:
key
);
@override
State
<
SosmedDashboard
>
createState
()
=>
_SosmedDashboardState
();
}
class
_SosmedDashboardState
extends
State
<
SosmedDashboard
>
{
var
btnText
=
'Save Setting'
;
var
enb
=
true
;
final
formKey
=
GlobalKey
<
FormState
>();
final
waController
=
TextEditingController
();
final
linkedController
=
TextEditingController
();
final
twitterController
=
TextEditingController
();
final
igController
=
TextEditingController
();
final
youtubeController
=
TextEditingController
();
@override
Widget
build
(
BuildContext
context
)
{
var
screenSize
=
MediaQuery
.
of
(
context
).
size
;
return
Container
(
color:
const
Color
.
fromRGBO
(
238
,
224
,
224
,
1
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
screenSize
.
width
*
0.05
,
vertical:
screenSize
.
height
*
0.05
),
child:
Container
(
width:
screenSize
.
width
,
height:
screenSize
.
height
*
0.8
,
padding:
const
EdgeInsets
.
only
(
left:
30
,
top:
15
,
right:
30
,
bottom:
15
),
color:
Colors
.
white
,
child:
Form
(
child:
Column
(
children:
[
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Text
(
"Social Media Setting"
,
style:
GoogleFonts
.
poppins
(
color:
Colors
.
black
,
fontSize:
25
,
fontWeight:
FontWeight
.
w600
,
letterSpacing:
1.1
)),
// SizedBox(
// height: 0,
// width: 820,
// ),
ElevatedButton
(
style:
ElevatedButton
.
styleFrom
(
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
circular
(
5
),
),
primary:
const
Color
.
fromARGB
(
255
,
0
,
67
,
192
),
),
onPressed:
()
{
switch
(
btnText
)
{
case
'Save Setting'
:
// createSetting(im.toString(), tt.toString(),
// tl.toString(), em.toString(), no.toString());
setState
(()
{
btnText
=
'Update Setting'
;
enb
=
false
;
});
break
;
case
'Update Setting'
:
setState
(()
{
enb
=
true
;
btnText
=
'Save Update'
;
});
break
;
case
'Save Update'
:
break
;
default
:
}
},
child:
Text
(
btnText
,
style:
const
TextStyle
(
fontSize:
16
,
fontWeight:
FontWeight
.
bold
),
),
),
],
),
const
Divider
(
height:
20
,
thickness:
1
,
// indent: 20,
// endIndent: 0,
color:
Colors
.
grey
,
),
SizedBox
(
height:
25
,
),
Column
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
listsosmed
(
Icon
(
Icons
.
whatsapp
,
color:
Colors
.
green
,
),
TextFormField
(
controller:
waController
,
decoration:
InputDecoration
(
hintText:
'Enter WhatsApp number without +, Ex : 6280000000000 '
),
),
ElevatedButton
(
onPressed:
()
{
showDialog
(
context:
context
,
builder:
(
BuildContext
context
)=>
AlertDialog
(
content:
Text
(
'Nomer'
),
)
,
);
},
child:
Text
(
'View Active'
))),
SizedBox
(
height:
10
,
),
listsosmed
(
Icon
(
FontAwesomeIcons
.
linkedin
,
color:
Colors
.
blue
,
),
TextFormField
(
controller:
linkedController
,
decoration:
InputDecoration
(
hintText:
'Enter a new Linkedin link address'
),
),
ElevatedButton
(
onPressed:
()
{
showDialog
(
context:
context
,
builder:
(
BuildContext
context
)=>
AlertDialog
(
content:
Text
(
'Linkedin'
),
)
,
);
},
child:
Text
(
'View Active'
))),
SizedBox
(
height:
10
,
),
listsosmed
(
Icon
(
FontAwesomeIcons
.
twitterSquare
,
color:
Colors
.
blueAccent
,
),
TextFormField
(
controller:
twitterController
,
decoration:
InputDecoration
(
hintText:
'Enter a new Twitter link address'
),
),
ElevatedButton
(
onPressed:
()
{
showDialog
(
context:
context
,
builder:
(
BuildContext
context
)=>
AlertDialog
(
content:
Text
(
'Twitter'
),
)
,
);
},
child:
Text
(
'View Active'
))),
SizedBox
(
height:
10
,
),
listsosmed
(
Icon
(
FontAwesomeIcons
.
instagramSquare
,
color:
Colors
.
pink
,
),
TextFormField
(
controller:
igController
,
decoration:
InputDecoration
(
hintText:
'Enter a new Instagram link address'
),
),
ElevatedButton
(
onPressed:
()
{
showDialog
(
context:
context
,
builder:
(
BuildContext
context
)=>
AlertDialog
(
content:
Text
(
'Instagram'
),
)
,
);
},
child:
Text
(
'View Active'
))),
SizedBox
(
height:
10
,
),
listsosmed
(
Icon
(
FontAwesomeIcons
.
youtube
,
color:
Colors
.
red
,
),
TextFormField
(
controller:
youtubeController
,
decoration:
InputDecoration
(
hintText:
'Enter a new Youtube link address'
),
),
ElevatedButton
(
onPressed:
()
{
showDialog
(
context:
context
,
builder:
(
BuildContext
context
)=>
AlertDialog
(
content:
Text
(
'Youtube'
),
)
,
);
},
child:
Text
(
'View Active'
))),
],
),
],
),
),
),
);
}
}
ListTile
listsosmed
(
Icon
icon
,
Widget
field
,
Widget
button
)
{
return
ListTile
(
leading:
icon
,
title:
field
,
trailing:
button
,
);
}
lib/dashboard/admin/main_dashboard_admin.dart
View file @
94a257eb
...
@@ -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_sosmed.dart'
;
import
'package:medapp_eksad/dashboard/admin/admin_whatsapp.dart'
;
import
'package:medapp_eksad/dashboard/admin/admin_whatsapp.dart'
;
class
DashboardAdmin
extends
StatefulWidget
{
class
DashboardAdmin
extends
StatefulWidget
{
...
@@ -116,26 +117,26 @@ class _DashboardAdminState extends State<DashboardAdmin> {
...
@@ -116,26 +117,26 @@ class _DashboardAdminState extends State<DashboardAdmin> {
// ),
// ),
),
),
SideMenuItem
(
SideMenuItem
(
priority:
2
,
priority:
1
,
title:
'Files'
,
title:
'Files'
,
onTap:
()
{
onTap:
()
{
page
.
jumpToPage
(
2
);
page
.
jumpToPage
(
1
);
},
},
icon:
const
Icon
(
Icons
.
file_copy_rounded
),
icon:
const
Icon
(
Icons
.
file_copy_rounded
),
),
),
SideMenuItem
(
SideMenuItem
(
priority:
3
,
priority:
2
,
title:
'
WhatsApp Number
'
,
title:
'
Social Media
'
,
onTap:
()
{
onTap:
()
{
page
.
jumpToPage
(
3
);
page
.
jumpToPage
(
2
);
},
},
icon:
const
Icon
(
Icons
.
whatsapp
),
icon:
const
Icon
(
Icons
.
phone_android
),
),
),
SideMenuItem
(
SideMenuItem
(
priority:
4
,
priority:
3
,
title:
'Message User'
,
title:
'Message User'
,
onTap:
()
{
onTap:
()
{
page
.
jumpToPage
(
4
);
page
.
jumpToPage
(
3
);
},
},
icon:
const
Icon
(
Icons
.
contact_mail
),
icon:
const
Icon
(
Icons
.
contact_mail
),
),
),
...
@@ -147,15 +148,6 @@ class _DashboardAdminState extends State<DashboardAdmin> {
...
@@ -147,15 +148,6 @@ class _DashboardAdminState extends State<DashboardAdmin> {
controller:
page
,
controller:
page
,
children:
[
children:
[
const
Dashboard1
(),
const
Dashboard1
(),
Container
(
color:
Colors
.
white
,
child:
const
Center
(
child:
Text
(
'Users'
,
style:
TextStyle
(
fontSize:
35
),
),
),
),
Container
(
Container
(
color:
Colors
.
white
,
color:
Colors
.
white
,
child:
const
Center
(
child:
const
Center
(
...
@@ -165,18 +157,9 @@ class _DashboardAdminState extends State<DashboardAdmin> {
...
@@ -165,18 +157,9 @@ class _DashboardAdminState extends State<DashboardAdmin> {
),
),
),
),
),
),
Dashboard3
(),
SosmedDashboard
(),
//Dashboard3(),
Dashboard4
(),
Dashboard4
(),
Container
(
color:
Colors
.
white
,
child:
const
Center
(
child:
Text
(
'Dashboard'
,
style:
TextStyle
(
fontSize:
35
),
),
),
),
],
],
),
),
),
),
...
...
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