mirror of
https://github.com/Iconica-Development/flutter_media_picker.git
synced 2025-05-19 00:43:45 +02:00
fix:left-button
This commit is contained in:
parent
cf6516bf25
commit
f0bdae34bd
5 changed files with 37 additions and 7 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
## 0.3.5
|
||||||
|
|
||||||
|
- Fixed left button
|
||||||
|
|
||||||
## 0.3.4
|
## 0.3.4
|
||||||
|
|
||||||
- Fixed audio recording that would start without permissions
|
- Fixed audio recording that would start without permissions
|
||||||
|
|
|
@ -104,9 +104,27 @@ class _MediaPickerExampleState extends ConsumerState<MediaPickerExample> {
|
||||||
// iconText: "Record audio",
|
// iconText: "Record audio",
|
||||||
// ),
|
// ),
|
||||||
checkPageSettings: {'title': 'Share audio'},
|
checkPageSettings: {'title': 'Share audio'},
|
||||||
onComplete: (MediaResult result) {
|
onComplete: (MediaResult result) =>
|
||||||
Navigator.pop(context);
|
Navigator.pop(context),
|
||||||
},
|
inputStyling: AudioInputStyling(
|
||||||
|
leftButton: (_, __) => GestureDetector(
|
||||||
|
onTap: () async => Navigator.pop(context),
|
||||||
|
child: Container(
|
||||||
|
width: MediaQuery.of(context).size.width * 0.3,
|
||||||
|
height: 45,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: const Color(0xFFD8D8D8),
|
||||||
|
borderRadius: BorderRadius.circular(15),
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Text(
|
||||||
|
'Back',
|
||||||
|
style: Theme.of(context).textTheme.button,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
audioService: audioService,
|
audioService: audioService,
|
||||||
),
|
),
|
||||||
MediaPickerInputText(
|
MediaPickerInputText(
|
||||||
|
|
|
@ -146,7 +146,7 @@ packages:
|
||||||
path: ".."
|
path: ".."
|
||||||
relative: true
|
relative: true
|
||||||
source: path
|
source: path
|
||||||
version: "0.3.4"
|
version: "0.3.5"
|
||||||
flutter_plugin_android_lifecycle:
|
flutter_plugin_android_lifecycle:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
|
@ -160,7 +160,15 @@ class _RecorderState extends ConsumerState<Recorder> {
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
widget.inputStyling.leftButton ?? const SizedBox(),
|
Expanded(
|
||||||
|
child: Center(
|
||||||
|
child: widget.inputStyling.leftButton?.call(
|
||||||
|
recording,
|
||||||
|
nextOnTap,
|
||||||
|
) ??
|
||||||
|
const SizedBox(),
|
||||||
|
),
|
||||||
|
),
|
||||||
widget.inputStyling.playButton?.call(
|
widget.inputStyling.playButton?.call(
|
||||||
recording,
|
recording,
|
||||||
playOnTap,
|
playOnTap,
|
||||||
|
@ -351,7 +359,7 @@ class AudioInputStyling {
|
||||||
final Widget Function(bool recording, Function onTap)? nextButton;
|
final Widget Function(bool recording, Function onTap)? nextButton;
|
||||||
|
|
||||||
/// leftButton is an extra button that can be filled in.
|
/// leftButton is an extra button that can be filled in.
|
||||||
final Widget? leftButton;
|
final Widget Function(bool recording, Function onTap)? leftButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Generic clock class can be created and used to keep the time.
|
/// Generic clock class can be created and used to keep the time.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
name: flutter_media_picker
|
name: flutter_media_picker
|
||||||
description: A new Flutter package project.
|
description: A new Flutter package project.
|
||||||
version: 0.3.4
|
version: 0.3.5
|
||||||
homepage: https://github.com/Iconica-Development/flutter_media_picker
|
homepage: https://github.com/Iconica-Development/flutter_media_picker
|
||||||
publish_to: "none"
|
publish_to: "none"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue