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-01-03 21:00:47 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
33e962c0cdf00d1cb5c3a2d5c678be8402093b60
33e962c0
1 parent
e3cd746c
update
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
234 additions
and
25 deletions
lib/poem/page/poem_detail.dart
lib/poem/page/poem_publish.dart
lib/poem/page/poem_record_audio.dart
lib/poem/poem_router.dart
lib/poem/page/poem_detail.dart
View file @
33e962c
...
...
@@ -7,6 +7,7 @@ import 'package:one_poem/poem/widgets/poem_user_audio.dart';
import
'package:one_poem/poem/widgets/poem_user_comments.dart'
;
import
'package:one_poem/res/gaps.dart'
;
import
'package:one_poem/routers/fluro_navigator.dart'
;
import
'package:one_poem/util/toast_utils.dart'
;
import
'package:one_poem/widgets/bars/home_action_bar.dart'
;
import
'package:one_poem/widgets/bars/home_menu_bar.dart'
;
import
'package:one_poem/widgets/my_app_bar.dart'
;
...
...
@@ -148,7 +149,9 @@ class _PoemDetailPageState extends State<PoemDetailPage> {
Icons
.
camera_alt_outlined
,
size:
36
.
px
,
),
onPressed:
()
{},
onPressed:
()
{
Toast
.
show
(
"不要着急吖,正在开发ing...."
);
},
)
],
),
...
...
lib/poem/page/poem_publish.dart
0 → 100644
View file @
33e962c
import
'package:flutter/material.dart'
;
import
'package:one_poem/res/resources.dart'
;
import
'package:one_poem/util/toast_utils.dart'
;
import
'package:one_poem/widgets/my_app_bar.dart'
;
class
PoemPublish
extends
StatefulWidget
{
const
PoemPublish
({
Key
?
key
,
required
this
.
data
})
:
super
(
key:
key
);
final
String
data
;
@override
_PoemPublishState
createState
()
=>
_PoemPublishState
();
}
class
_PoemPublishState
extends
State
<
PoemPublish
>
{
@override
void
initState
()
{
super
.
initState
();
}
@override
void
dispose
()
{
super
.
dispose
();
}
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
appBar:
MyAppBar
(
homeMenuHeader:
Container
(
alignment:
Alignment
.
center
,
width:
double
.
infinity
,
child:
const
Text
(
"发布临境"
,
style:
TextStyle
(
color:
Colors
.
white
,
),
),
),
),
body:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
<
Widget
>[
Padding
(
padding:
const
EdgeInsets
.
all
(
10.0
,
),
child:
ConstrainedBox
(
constraints:
const
BoxConstraints
(
maxHeight:
200
,
maxWidth:
double
.
infinity
,
),
child:
TextField
(
maxLines:
10
,
decoration:
InputDecoration
(
contentPadding:
const
EdgeInsets
.
all
(
10.0
),
hintText:
'读此一言,仿佛身临其境'
,
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
5
),
borderSide:
BorderSide
.
none
),
filled:
true
,
fillColor:
Colors
.
grey
.
shade100
,
),
),
),
),
Container
(
padding:
const
EdgeInsets
.
all
(
10.0
),
alignment:
Alignment
.
centerLeft
,
width:
double
.
infinity
,
height:
36.0
,
child:
Wrap
(
children:
const
[
Icon
(
Icons
.
room_outlined
,
size:
15
,
),
Text
(
"我在此地"
,
style:
TextStyle
(
color:
Colors
.
black45
),
),
],
),
),
Container
(
padding:
const
EdgeInsets
.
all
(
10.0
),
alignment:
Alignment
.
centerLeft
,
width:
double
.
infinity
,
height:
36.0
,
child:
Wrap
(
children:
const
[
Icon
(
Icons
.
room_outlined
,
size:
15
,
),
Text
(
"所用口音"
,
style:
TextStyle
(
color:
Colors
.
black45
),
),
Gaps
.
hGap10
,
Text
(
"普通话"
,
style:
TextStyle
(
color:
Colors
.
black45
),
),
],
),
),
Gaps
.
vGap24
,
Expanded
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
Container
(
height:
36.0
,
alignment:
Alignment
.
center
,
width:
double
.
infinity
,
child:
const
Text
(
"发布临境,让更多人身临其境"
,
style:
TextStyle
(
fontSize:
12.0
),
),
),
Container
(
height:
48.0
,
alignment:
Alignment
.
center
,
width:
double
.
infinity
,
child:
TextButton
(
style:
ButtonStyle
(
side:
MaterialStateProperty
.
all
(
const
BorderSide
(
color:
Colors
.
black54
,
width:
1
),
),
),
onPressed:
()
{
Toast
.
show
(
"先不发布了吧。。。。"
);
},
child:
const
Text
(
"发布"
,
style:
TextStyle
(
color:
Colors
.
black54
,
fontSize:
15.0
),
),
),
),
],
),
),
],
),
);
}
}
lib/poem/page/poem_record_audio.dart
View file @
33e962c
...
...
@@ -4,12 +4,16 @@ import 'package:flutter/cupertino.dart';
import
'package:flutter/material.dart'
;
import
'package:one_poem/poem/widgets/poem_content.dart'
;
import
'package:one_poem/recorder/widgets/poem_voice_widget.dart'
;
import
'package:one_poem/routers/fluro_navigator.dart'
;
import
'package:one_poem/util/toast_utils.dart'
;
import
'package:one_poem/widgets/bars/home_action_bar.dart'
;
import
'package:one_poem/widgets/bars/home_menu_bar.dart'
;
import
'package:one_poem/widgets/my_app_bar.dart'
;
import
'package:one_poem/extension/int_extension.dart'
;
import
'../poem_router.dart'
;
class
PoemRecordAudioPage
extends
StatefulWidget
{
@override
State
<
StatefulWidget
>
createState
()
=>
_PoemRecordAudioPageState
();
...
...
@@ -114,7 +118,9 @@ class _PoemRecordAudioPageState extends State<PoemRecordAudioPage> {
Icons
.
camera_alt_outlined
,
size:
28
.
px
,
),
onPressed:
()
{},
onPressed:
()
{
Toast
.
show
(
"不要着急吖,正在开发ing...."
);
},
),
),
SizedBox
(
...
...
@@ -129,6 +135,30 @@ class _PoemRecordAudioPageState extends State<PoemRecordAudioPage> {
),
],
),
Container
(
padding:
const
EdgeInsets
.
all
(
10.0
),
alignment:
Alignment
.
centerRight
,
height:
54.0
,
width:
double
.
infinity
,
child:
TextButton
(
style:
ButtonStyle
(
side:
MaterialStateProperty
.
all
(
const
BorderSide
(
color:
Colors
.
black54
,
width:
1
),
),
),
onPressed:
()
{
NavigatorUtils
.
push
(
context
,
'
${PoemRouter.poemPublish}
?data=100'
,
);
},
child:
const
Text
(
"下一步"
,
style:
TextStyle
(
color:
Colors
.
white
),
),
),
),
],
),
),
...
...
lib/poem/poem_router.dart
View file @
33e962c
...
...
@@ -3,6 +3,7 @@ import 'package:one_poem/poem/page/poem_record_audio.dart';
import
'package:one_poem/routers/i_router.dart'
;
import
'page/poem_detail.dart'
;
import
'page/poem_page.dart'
;
import
'page/poem_publish.dart'
;
import
'page/poem_video_player.dart'
;
class
PoemRouter
implements
IRouterProvider
{
...
...
@@ -10,31 +11,59 @@ class PoemRouter implements IRouterProvider {
static
String
poemDetailPage
=
'/detail'
;
static
String
poemRecordAudioPage
=
'/poem/record/audio'
;
static
String
poemVidePlayer
=
'/poem/video/player'
;
static
String
poemPublish
=
'/poem/publish'
;
@override
void
initRouter
(
FluroRouter
router
)
{
router
.
define
(
poemPage
,
handler:
Handler
(
handlerFunc:
(
_
,
__
)
=>
const
PoemPage
()));
router
.
define
(
poemDetailPage
,
handler:
Handler
(
handlerFunc:
(
_
,
Map
<
String
,
List
<
String
>>
params
)
{
String
?
id
=
params
[
'id'
]?.
first
;
return
PoemDetailPage
(
poemId:
int
.
parse
(
id
!),
);
}));
router
.
define
(
poemRecordAudioPage
,
handler:
Handler
(
handlerFunc:
(
_
,
Map
<
String
,
List
<
String
>>
params
)
{
String
?
id
=
params
[
'id'
]?.
first
;
return
PoemRecordAudioPage
(
poemId:
int
.
parse
(
id
!),
);
}));
router
.
define
(
poemVidePlayer
,
handler:
Handler
(
handlerFunc:
(
_
,
Map
<
String
,
List
<
String
>>
params
)
{
String
?
url
=
params
[
'url'
]?.
first
;
return
PoemVideoPlayer
(
url:
url
!,
);
}));
router
.
define
(
poemPage
,
handler:
Handler
(
handlerFunc:
(
_
,
__
)
=>
const
PoemPage
(),
),
);
router
.
define
(
poemDetailPage
,
handler:
Handler
(
handlerFunc:
(
_
,
Map
<
String
,
List
<
String
>>
params
)
{
String
?
id
=
params
[
'id'
]?.
first
;
return
PoemDetailPage
(
poemId:
int
.
parse
(
id
!),
);
},
),
);
router
.
define
(
poemRecordAudioPage
,
handler:
Handler
(
handlerFunc:
(
_
,
Map
<
String
,
List
<
String
>>
params
)
{
String
?
id
=
params
[
'id'
]?.
first
;
return
PoemRecordAudioPage
(
poemId:
int
.
parse
(
id
!),
);
},
),
);
router
.
define
(
poemVidePlayer
,
handler:
Handler
(
handlerFunc:
(
_
,
Map
<
String
,
List
<
String
>>
params
)
{
String
?
url
=
params
[
'url'
]?.
first
;
return
PoemVideoPlayer
(
url:
url
!,
);
},
),
);
router
.
define
(
poemPublish
,
handler:
Handler
(
handlerFunc:
(
_
,
Map
<
String
,
List
<
String
>>
params
)
{
String
?
data
=
params
[
'data'
]?.
first
;
return
PoemPublish
(
data:
data
!,
);
},
),
);
}
}
...
...
Please
register
or
login
to post a comment