Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
second_display
Project
Project
Details
Activity
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
Dio Maulana
second_display
Commits
f0eae93a
Commit
f0eae93a
authored
Mar 31, 2022
by
Dio Maulana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perbaiki tampilan
parent
90dd4942
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
109 additions
and
80 deletions
+109
-80
AndroidManifest.xml
android/app/src/main/AndroidManifest.xml
+1
-0
api.dart
lib/api/api.dart
+1
-1
error.dart
lib/ui/error.dart
+69
-66
main_page.dart
lib/ui/main_page.dart
+29
-10
splash.dart
lib/ui/splash.dart
+1
-1
youtube.dart
lib/ui/youtube.dart
+8
-2
No files found.
android/app/src/main/AndroidManifest.xml
View file @
f0eae93a
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"com.example.second_display"
>
<uses-permission
android:name=
"android.permission.INTERNET"
/>
<application
android:label=
"second_display"
android:name=
"${applicationName}"
...
...
lib/api/api.dart
View file @
f0eae93a
...
...
@@ -37,7 +37,7 @@ class Api {
/// load data dari api midware getby id
/// load data dari midwar file json
/// load data dari midwar
e
file json
Map
data
=
{};
var
bodi
=
jsonEncode
(
data
);
...
...
lib/ui/error.dart
View file @
f0eae93a
...
...
@@ -8,7 +8,9 @@ class ErrorPage extends StatelessWidget {
final
String
?
baseUrls
=
prefs
.
getString
(
'base_url'
);
@override
Widget
build
(
BuildContext
context
)
{
return
Column
(
return
Container
(
color:
Colors
.
white
,
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
SizedBox
(
...
...
@@ -74,6 +76,7 @@ class ErrorPage extends StatelessWidget {
],
)
],
),
);
}
}
lib/ui/main_page.dart
View file @
f0eae93a
...
...
@@ -12,6 +12,7 @@ import 'package:second_display/ui/youtube.dart';
// ignore: must_be_immutable
class
MainPage
extends
StatelessWidget
{
bool
isOrderActive
=
true
;
MainPage
({
Key
?
key
})
:
super
(
key:
key
);
@override
Widget
build
(
BuildContext
context
)
{
...
...
@@ -52,7 +53,9 @@ class MainPage extends StatelessWidget {
(
configState
[
0
].
mediaType
==
'video'
)
?
Container
(
height:
MediaQuery
.
of
(
context
).
size
.
height
,
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.6
,
width:
(
isOrderActive
)
?
MediaQuery
.
of
(
context
).
size
.
width
*
0.6
:
MediaQuery
.
of
(
context
).
size
.
width
*
1
,
color:
colorBackgroundCarouselandVideo
,
// color: Colors.white,
child:
VideoPromotion
(
...
...
@@ -61,25 +64,41 @@ class MainPage extends StatelessWidget {
:
(
configState
[
0
].
mediaType
==
'image'
)
?
Container
(
height:
MediaQuery
.
of
(
context
).
size
.
height
,
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.6
,
width:
(
isOrderActive
)
?
MediaQuery
.
of
(
context
).
size
.
width
*
0.6
:
MediaQuery
.
of
(
context
).
size
.
width
*
1
,
child:
CarouselIndicator
(
backgroundColor:
colorBackgroundCarouselandVideo
),
)
:
Container
(
height:
MediaQuery
.
of
(
context
).
size
.
height
,
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.6
,
width:
(
isOrderActive
)
?
MediaQuery
.
of
(
context
).
size
.
width
*
0.6
:
MediaQuery
.
of
(
context
).
size
.
width
*
1
,
child:
YoutubeVideo
(
backgroundColor:
colorBackgroundCarouselandVideo
,
youtubeId:
configState
[
0
].
youtubeId
),
youtubeId:
configState
[
0
].
youtubeId
,
isOrderActive:
isOrderActive
),
),
Container
(
(
isOrderActive
)
?
Container
(
height:
MediaQuery
.
of
(
context
).
size
.
height
,
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.4
,
color:
backgroundColorOrder
,
// decoration: const BoxDecoration(
// gradient: LinearGradient(
// begin: Alignment.topLeft,
// end: Alignment.bottomRight,
// colors: [
// Colors.blue,
// Colors.white,
// ],
// )),
child:
OrderPage
(
textColor:
textColor
),
)
:
const
SizedBox
(
height:
0
,
width:
0
)
],
);
},
...
...
lib/ui/splash.dart
View file @
f0eae93a
import
'dart:html'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_bloc/flutter_bloc.dart'
;
...
...
lib/ui/youtube.dart
View file @
f0eae93a
...
...
@@ -6,8 +6,12 @@ import 'package:youtube_player_iframe/youtube_player_iframe.dart';
class
YoutubeVideo
extends
StatefulWidget
{
final
String
youtubeId
;
final
Color
backgroundColor
;
final
bool
isOrderActive
;
const
YoutubeVideo
(
{
Key
?
key
,
required
this
.
youtubeId
,
required
this
.
backgroundColor
})
{
Key
?
key
,
required
this
.
youtubeId
,
required
this
.
backgroundColor
,
required
this
.
isOrderActive
})
:
super
(
key:
key
);
@override
...
...
@@ -48,7 +52,9 @@ class _YoutubeVideoState extends State<YoutubeVideo> {
@override
Widget
build
(
BuildContext
context
)
{
var
widthYoutbe
=
MediaQuery
.
of
(
context
).
size
.
width
*
0.6
;
var
widthYoutbe
=
(
widget
.
isOrderActive
)
?
MediaQuery
.
of
(
context
).
size
.
width
*
0.6
:
MediaQuery
.
of
(
context
).
size
.
width
*
1
;
var
heighYoutbe
=
MediaQuery
.
of
(
context
).
size
.
height
;
// return Center(
// child: Container(
...
...
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