mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-16 01:56:19 +00:00
added an alert dialog function call in context extension
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:syncrow_app/features/scene/view/widgets/scene_list_tile.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/light_divider.dart';
|
||||
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_large.dart';
|
||||
@ -71,7 +72,17 @@ class CustomBottomSheetWidget extends StatelessWidget {
|
||||
size: 16,
|
||||
color: ColorsManager.greyColor,
|
||||
),
|
||||
onPressed: () {},
|
||||
onPressed: () {
|
||||
context.customAlertDialog(
|
||||
height: 300,
|
||||
child: Material(
|
||||
child: DefaultContainer(
|
||||
width: context.width * 0.8,
|
||||
child: Text('Comming soon'),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
@ -1,7 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:syncrow_app/features/scene/view/widgets/scene_list_tile.dart';
|
||||
import 'package:syncrow_app/features/scene/view/widgets/if_then_containers/bottom_sheet_widget.dart';
|
||||
import 'package:syncrow_app/features/scene/view/widgets/bottom_sheet_widget.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/light_divider.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_large.dart';
|
||||
|
@ -43,4 +43,13 @@ extension ContextExtension on BuildContext {
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
void customAlertDialog({required Widget child, required double height}) {
|
||||
showDialog(
|
||||
context: this,
|
||||
builder: (BuildContext context) {
|
||||
return Dialog(child: SizedBox(height: height, child: child));
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user