Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
ChatGPT
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
关振斌
ChatGPT
Commits
8a903885
Commit
8a903885
authored
Apr 13, 2023
by
skeyboy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Android 登录页修改
parent
c70dc107
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
755 additions
and
509 deletions
+755
-509
assets/images/2.0x/ic_launcher.png
assets/images/2.0x/ic_launcher.png
+0
-0
assets/images/3.0x/ic_launcher.png
assets/images/3.0x/ic_launcher.png
+0
-0
assets/images/ic_launcher.png
assets/images/ic_launcher.png
+0
-0
lib/pages/frame/sign_in/view.dart
lib/pages/frame/sign_in/view.dart
+266
-255
lib/pages/home/controller.dart
lib/pages/home/controller.dart
+35
-15
pubspec.lock
pubspec.lock
+454
-239
No files found.
assets/images/2.0x/ic_launcher.png
0 → 100644
View file @
8a903885
2.81 KB
assets/images/3.0x/ic_launcher.png
0 → 100644
View file @
8a903885
2.81 KB
assets/images/ic_launcher.png
0 → 100644
View file @
8a903885
2.81 KB
lib/pages/frame/sign_in/view.dart
View file @
8a903885
import
'dart:io'
;
import
'package:bruno/bruno.dart'
;
import
'package:chart/common/routers/routes.dart'
;
import
'package:chart/pages/application/index.dart'
;
import
'package:file_picker/file_picker.dart'
;
...
...
@@ -591,33 +590,45 @@ class SignInPage extends GetView<SignInController> {
Widget
buildAndroidSigin
(
BuildContext
buildContext
)
{
return
GestureDetector
(
onTap:
()=>
Focus
.
of
(
buildContext
).
unfocus
()
,
child:
Stack
(
alignment:
Alignment
.
center
,
child
ren:
<
Widget
>[
Container
(
behavior:
HitTestBehavior
.
translucent
,
onTap:
()
=>
Focus
.
of
(
buildContext
).
unfocus
(),
child:
SingleChildScrollView
(
child
:
Container
(
height:
Get
.
height
,
decoration:
BoxDecoration
(
image:
DecorationImage
(
image:
Image
.
asset
(
"assets/images/background.png"
).
image
,
fit:
BoxFit
.
cover
),
),
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
child:
Stack
(
children:
[
Positioned
(
child:
GestureDetector
(
onTap:
()
=>
Get
.
back
(),
child:
Icon
(
Icons
.
arrow_back
)),
top:
45
,
left:
35
,
),
Column
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
<
Widget
>[
SizedBox
(
height:
defaultPadding
*
8
),
Column
(
children:
[
Row
(
children:
[
const
Spacer
(),
SizedBox
(
height:
145
,
width:
145
,
child:
Image
.
asset
(
"assets/images/logo.png"
),
height:
75
,
width:
75
,
child:
Image
.
asset
(
"assets/images/ic_launcher.png"
,
fit:
BoxFit
.
fill
,
),
),
const
Spacer
(),
],
),
SizedBox
(
height:
defaultPadding
*
1.5
),
SizedBox
(
height:
defaultPadding
*
4
),
],
),
Row
(
...
...
@@ -698,10 +709,10 @@ class SignInPage extends GetView<SignInController> {
],
),
],
)
],
),
),
],
),
);
...
...
lib/pages/home/controller.dart
View file @
8a903885
...
...
@@ -30,6 +30,7 @@ import 'package:flutter_client_sse/flutter_client_sse.dart';
//
class
HomeController
extends
GetxController
with
SingleGetTickerProviderMixin
{
HomeController
();
static
HomeController
get
to
=>
Get
.
put
(
HomeController
());
/// 响应式成员变量
...
...
@@ -41,6 +42,7 @@ class HomeController extends GetxController with SingleGetTickerProviderMixin {
late
AnimationController
_controller
;
late
Animation
<
double
>
_animation
;
bool
_isRotated
=
false
;
// ignore: prefer_typing_uninitialized_variables
late
var
sse
;
...
...
@@ -69,8 +71,24 @@ class HomeController extends GetxController with SingleGetTickerProviderMixin {
/// 事件
bool
gotoLoginPage
()
{
if
(
UserStore
.
to
.
isLogin
==
false
)
{
Get
.
toNamed
(
AppRoutes
.
SIGN_IN
);
return
true
;
}
else
{
return
false
;
}
}
void
sendMessage
(
Chat
.
ChatMessage
message
)
async
{
if
(
state
.
isLoading
||
message
.
text
.
trim
().
isEmpty
)
{
if
(
state
.
isLoading
||
message
.
text
.
trim
()
.
isEmpty
)
{
return
;
}
/// 需要先进入登录页才可
if
(
gotoLoginPage
())
{
return
;
}
Vibrate
.
feedback
(
FeedbackType
.
impact
);
...
...
@@ -185,6 +203,7 @@ class HomeController extends GetxController with SingleGetTickerProviderMixin {
void
addCount
()
{
// count.value = count.value + 1;
}
// 方法
closeChat
()
async
{
...
...
@@ -365,7 +384,8 @@ class HomeController extends GetxController with SingleGetTickerProviderMixin {
try
{
await
UserAPI
.
resetConversion
();
EasyLoading
.
showToast
(
'已将对话上下文重置!'
,
maskType:
EasyLoadingMaskType
.
none
);
EasyLoading
.
showToast
(
'已将对话上下文重置!'
,
maskType:
EasyLoadingMaskType
.
none
);
}
catch
(
e
)
{}
}
...
...
@@ -461,8 +481,8 @@ class HomeController extends GetxController with SingleGetTickerProviderMixin {
ApplicationController
.
to
.
onLongPressEnd
(
details
);
}
// onLongPressStart: cc.onLongPressStart,
// onLongPressEnd: cc.onLongPressEnd
// onLongPressStart: cc.onLongPressStart,
// onLongPressEnd: cc.onLongPressEnd
// obx(Map map) {}
// obx(Map map) {}
}
pubspec.lock
View file @
8a903885
This diff is collapsed.
Click to expand it.
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