Skip to content

Commit

Permalink
final final
Browse files Browse the repository at this point in the history
  • Loading branch information
aymendn committed Apr 6, 2022
1 parent c59ce7a commit 26f01e3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
11 changes: 11 additions & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_localizations/flutter_localizations.dart';

import 'providers/foods.dart';
Expand All @@ -16,6 +17,16 @@ import 'package:provider/provider.dart';
import 'constants.dart';

void main() {
WidgetsFlutterBinding.ensureInitialized();

// set a list of alowed Orientations:
SystemChrome.setPreferredOrientations(
[
DeviceOrientation.portraitUp,
DeviceOrientation.portraitDown,
],
);

runApp(const MyApp());
}

Expand Down
8 changes: 6 additions & 2 deletions lib/screens/home/home_screen.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

import '../../widgets/custom_icon.dart';
import '../about_screen.dart';
Expand All @@ -11,7 +12,6 @@ class HomeScreen extends StatelessWidget {

@override
Widget build(BuildContext context) {

return SafeArea(
child: Scaffold(
body: Column(
Expand Down Expand Up @@ -48,10 +48,14 @@ class HomeScreen extends StatelessWidget {
},
),
const Spacer(),
const CustomIcon(
CustomIcon(
image: 'assets/icons/logout-white.png',
height: 60,
isGradient: true,
onTap: () {
SystemChannels.platform
.invokeMethod('SystemNavigator.pop');
},
)
],
),
Expand Down

0 comments on commit 26f01e3

Please sign in to comment.