mirror of
https://github.com/Myzel394/quid_faciam_hodie.git
synced 2025-06-19 07:35:26 +02:00
added sheet indicator
This commit is contained in:
parent
171633c907
commit
e0afe288b3
@ -15,6 +15,7 @@ import 'package:share_location/widgets/animate_in_builder.dart';
|
||||
import 'package:share_location/widgets/camera_button.dart';
|
||||
import 'package:share_location/widgets/change_camera_button.dart';
|
||||
import 'package:share_location/widgets/fade_and_move_in_animation.dart';
|
||||
import 'package:share_location/widgets/sheet_indicator.dart';
|
||||
import 'package:share_location/widgets/today_photo_button.dart';
|
||||
import 'package:share_location/widgets/uploading_photo.dart';
|
||||
import 'package:supabase_flutter/supabase_flutter.dart';
|
||||
@ -292,7 +293,13 @@ class _MainScreenState extends AuthRequiredState<MainScreen> with Loadable {
|
||||
topRight: Radius.circular(LARGE_SPACE),
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
const Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: MEDIUM_SPACE),
|
||||
child: SheetIndicator(),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(LARGE_SPACE),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
@ -304,14 +311,16 @@ class _MainScreenState extends AuthRequiredState<MainScreen> with Loadable {
|
||||
SECONDARY_BUTTONS_DURATION_MULTIPLIER,
|
||||
child: ChangeCameraButton(
|
||||
onChangeCamera: () {
|
||||
final currentCameraIndex = GlobalValuesManager.cameras
|
||||
final currentCameraIndex = GlobalValuesManager
|
||||
.cameras
|
||||
.indexOf(controller!.description);
|
||||
final availableCameras =
|
||||
GlobalValuesManager.cameras.length;
|
||||
|
||||
onNewCameraSelected(
|
||||
GlobalValuesManager.cameras[
|
||||
(currentCameraIndex + 1) % availableCameras],
|
||||
(currentCameraIndex + 1) %
|
||||
availableCameras],
|
||||
);
|
||||
},
|
||||
),
|
||||
@ -351,6 +360,8 @@ class _MainScreenState extends AuthRequiredState<MainScreen> with Loadable {
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
expandableContent: Padding(
|
||||
padding: const EdgeInsets.all(LARGE_SPACE),
|
||||
@ -392,8 +403,6 @@ class _MainScreenState extends AuthRequiredState<MainScreen> with Loadable {
|
||||
onPressed: () {
|
||||
final newZoomLevelIndex =
|
||||
((currentZoomLevel + 1) % zoomLevels.length).toInt();
|
||||
print(newZoomLevelIndex);
|
||||
print(zoomLevels);
|
||||
|
||||
controller!.setZoomLevel(zoomLevels[newZoomLevelIndex]);
|
||||
|
||||
|
17
lib/widgets/sheet_indicator.dart
Normal file
17
lib/widgets/sheet_indicator.dart
Normal file
@ -0,0 +1,17 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SheetIndicator extends StatelessWidget {
|
||||
const SheetIndicator({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: 100,
|
||||
height: 5,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white24,
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user