Toggle navigation
Toggle navigation
This project
Loading...
Sign in
OnePoem
/
OnePoem-App
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
reason
2022-07-07 07:59:55 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f5f0b33acdea9ee57cc35d78bc4d64b49a7db292
f5f0b33a
1 parent
0aa66a8d
修改高地地图key
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
20 additions
and
6 deletions
android/app/src/main/AndroidManifest.xml
android/app/src/main/res/xml/network_security_config.xml
lib/poem/page/poem_record_audio.dart
lib/poem/page/poem_record_video.dart
lib/poem/page/select_address_page.dart
pubspec.lock
pubspec.yaml
android/app/src/main/AndroidManifest.xml
View file @
f5f0b33
...
...
@@ -6,6 +6,7 @@
android:icon=
"@mipmap/ic_launcher"
android:label=
"Parlando"
android:requestLegacyExternalStorage=
"true"
android:networkSecurityConfig=
"@xml/network_security_config"
tools:replace=
"android:label"
>
<activity
android:name=
".MainActivity"
...
...
@@ -51,6 +52,9 @@
<meta-data
android:name=
"com.facebook.sdk.ClientToken"
android:value=
"@string/facebook_client_token"
/>
<meta-data
android:name=
"com.amap.api.v2.apikey"
android:value=
"038a8a2d7280a244b5c51d517023ede3"
/>
</application>
<queries>
...
...
android/app/src/main/res/xml/network_security_config.xml
0 → 100644
View file @
f5f0b33
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config
cleartextTrafficPermitted=
"true"
/>
</network-security-config>
\ No newline at end of file
lib/poem/page/poem_record_audio.dart
View file @
f5f0b33
...
...
@@ -15,6 +15,7 @@ import 'package:pausable_timer/pausable_timer.dart';
import
'package:flutter_sound_platform_interface/flutter_sound_recorder_platform_interface.dart'
;
import
'package:flutter/foundation.dart'
show
kIsWeb
;
import
'package:permission_handler/permission_handler.dart'
;
import
'package:wakelock/wakelock.dart'
;
import
'../poem_router.dart'
;
...
...
@@ -158,10 +159,10 @@ class AudioToolBar extends StatefulWidget {
})
:
super
(
key:
key
);
@override
_AudioToolBarState
createState
()
=>
_
AudioToolBarState
();
AudioToolBarState
createState
()
=>
AudioToolBarState
();
}
class
_
AudioToolBarState
extends
State
<
AudioToolBar
>
{
class
AudioToolBarState
extends
State
<
AudioToolBar
>
{
late
final
PausableTimer
_timer
;
int
currentTimer
=
0
;
int
duration
=
60
*
1000
;
...
...
@@ -180,7 +181,7 @@ class _AudioToolBarState extends State<AudioToolBar> {
@override
void
initState
()
{
super
.
initState
();
Wakelock
.
enable
();
_mPlayer
!.
openPlayer
().
then
((
value
)
{
setState
(()
{
_mPlayerIsInited
=
true
;
...
...
@@ -216,6 +217,7 @@ class _AudioToolBarState extends State<AudioToolBar> {
_mRecorder
!.
closeRecorder
();
_mRecorder
=
null
;
Wakelock
.
disable
();
super
.
dispose
();
}
...
...
lib/poem/page/poem_record_video.dart
View file @
f5f0b33
...
...
@@ -12,6 +12,7 @@ import 'package:path_provider/path_provider.dart';
import
'package:pausable_timer/pausable_timer.dart'
;
import
'package:video_player/video_player.dart'
;
import
'package:Parlando/extension/int_extension.dart'
;
import
'package:wakelock/wakelock.dart'
;
import
'../poem_router.dart'
;
...
...
@@ -55,6 +56,7 @@ class PoemRecordVideoPageState extends State<PoemRecordVideoPage>
@override
void
initState
()
{
Wakelock
.
enable
();
// Hide the status bar in Android
SystemChrome
.
setEnabledSystemUIMode
(
SystemUiMode
.
manual
,
overlays:
[]);
initCameras
().
then
((
value
)
{
...
...
@@ -69,7 +71,7 @@ class PoemRecordVideoPageState extends State<PoemRecordVideoPage>
_timer
=
PausableTimer
(
const
Duration
(
milliseconds:
100
),
()
{
()
{
currentTimer
+=
100
;
_timer
..
reset
()
...
...
@@ -244,6 +246,7 @@ class PoemRecordVideoPageState extends State<PoemRecordVideoPage>
///取消计时器
_timer
.
cancel
();
Wakelock
.
disable
();
super
.
dispose
();
}
...
...
lib/poem/page/select_address_page.dart
View file @
f5f0b33
...
...
@@ -29,7 +29,7 @@ class _AddressSelectPageState extends State<AddressSelectPage> {
super
.
initState
();
// TODO 需要根据项目单独设置keys
Flutter2dAMap
.
setApiKey
(
iOSKey:
'
4327916279bf45a044bb53b94744238
7'
,
iOSKey:
'
d94fbf50f5bfa86cd4e793c9ed4a9a9
7'
,
);
}
...
...
pubspec.lock
View file @
f5f0b33
This diff is collapsed. Click to expand it.
pubspec.yaml
View file @
f5f0b33
...
...
@@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version
:
1.0.0+
4
version
:
1.0.0+
5
environment
:
sdk
:
"
>=2.16.2
<3.0.0"
...
...
@@ -128,6 +128,7 @@ dependencies:
flutter_easy_permission
:
^1.1.2
google_fonts
:
^3.0.1
wakelock
:
^0.6.1+2
dependency_overrides
:
decimal
:
1.5.0
...
...
Please
register
or
login
to post a comment