Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
Mobile App
Manage
Activity
Members
Labels
Plan
Issues
3
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Code
Mobile App
Commits
7ca0e586
Commit
7ca0e586
authored
5 years ago
by
igorwork
Committed by
Markin Igor
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add config.
parent
d7ede746
No related branches found
No related tags found
1 merge request
!1
Mobile app initial implementation.
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/config.dart
+1
-0
1 addition, 0 deletions
lib/config.dart
lib/screens/home.dart
+8
-9
8 additions, 9 deletions
lib/screens/home.dart
with
9 additions
and
9 deletions
lib/config.dart
0 → 100644
+
1
−
0
View file @
7ca0e586
const
String
APP_HOST
=
"https://demo1.vereign.com"
;
\ No newline at end of file
This diff is collapsed.
Click to expand it.
lib/screens/home.dart
+
8
−
9
View file @
7ca0e586
...
...
@@ -5,6 +5,8 @@ import 'package:url_launcher/url_launcher.dart';
import
'dart:developer'
;
import
'dart:convert'
;
import
'../config.dart'
;
class
Home
extends
StatefulWidget
{
Home
({
@required
this
.
mode
,
@required
this
.
invokerURL
,
@required
this
.
setMode
});
final
String
mode
;
...
...
@@ -19,12 +21,10 @@ String clientId = "222222";
String
clientSecret
=
"22222222"
;
String
redirectURL
=
"app://com.vereign.app/oauth2"
;
String
authEndpoint
=
"
https://gospodinbodurov.dev.vereign.com
/api/oauth2/authorize"
;
String
tokenEndpoint
=
"
https://gospodinbodurov.dev.vereign.com
/api/oauth2/token"
;
String
authEndpoint
=
"
$APP_HOST
/api/oauth2/authorize"
;
String
tokenEndpoint
=
"
$APP_HOST
/api/oauth2/token"
;
class
_HomeState
extends
State
<
Home
>
{
final
_links
=
[
'vereign://app.vereign.com'
,
'vereign://app.vereign.com/oauth2'
,
'testredirect://app.vereign.com'
,
'https://igormarkin.dev.vereign.com'
,
'https://gospodinbodurov.dev.vereign.com'
];
@override
initState
()
{
super
.
initState
();
...
...
@@ -84,7 +84,7 @@ class _HomeState extends State<Home> {
}
openVereign
()
{
FlutterWebBrowser
.
openWebPage
(
url:
'https://gospodinbodurov.dev.vereign.com'
,
androidToolbarColor:
Color
(
0xFFd51d32
));
FlutterWebBrowser
.
openWebPage
(
url:
APP_HOST
,
androidToolbarColor:
Color
(
0xFFd51d32
));
}
startOAuth
()
{
...
...
@@ -115,14 +115,13 @@ class _HomeState extends State<Home> {
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
stretch
,
// children: _links.map((link) => _urlButton(context, link)).toList(),
children:
<
Widget
>[
_urlButton
(
context
,
_links
[
0
],
"Open Dashboard"
,
openVereign
),
_urlButton
(
context
,
_links
[
1
],
"Authorize with Vereign"
,
startOAuth
),
_urlButton
(
context
,
"Open Dashboard"
,
openVereign
),
_urlButton
(
context
,
"Authorize with Vereign"
,
startOAuth
),
]
))));
}
Widget
_urlButton
(
BuildContext
context
,
String
url
,
String
title
,
listener
)
{
Widget
_urlButton
(
BuildContext
context
,
String
title
,
listener
)
{
return
Container
(
padding:
EdgeInsets
.
all
(
20.0
),
child:
FlatButton
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment