Skip to content

Commit

Permalink
responsive
Browse files Browse the repository at this point in the history
  • Loading branch information
mo7amedaliEbaid committed Apr 9, 2024
1 parent cd2a855 commit d39da26
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 2 deletions.
39 changes: 37 additions & 2 deletions lib/core/widgets/app_bar.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import 'package:anim_search_bar/anim_search_bar.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:movies_riverpod/core/app/app_dimensions.dart';
import 'package:movies_riverpod/core/extensions/build_context_extensions.dart';
import 'package:movies_riverpod/core/responsive/responsive.dart';

Expand All @@ -9,9 +11,20 @@ import '../../features/notifications/presentation/screen/desktop_notification_sc
import '../app/app_colors.dart';
import '../app/app_strings.dart';

class CustomAppBar extends StatelessWidget implements PreferredSizeWidget {
class CustomAppBar extends StatefulWidget implements PreferredSizeWidget {
const CustomAppBar({Key? key}) : super(key: key);

@override
State<CustomAppBar> createState() => _CustomAppBarState();

@override
// TODO: implement preferredSize
Size get preferredSize => Size(0, AppDimensions.p64);
}

class _CustomAppBarState extends State<CustomAppBar> {

TextEditingController textEditingController=TextEditingController();
@override
Widget build(BuildContext context) {
final Color iconColor = context.theme.brightness == Brightness.light
Expand All @@ -36,6 +49,28 @@ class CustomAppBar extends StatelessWidget implements PreferredSizeWidget {
),
),
actions: [
/* Padding(
padding: const EdgeInsets.only(top: 12.0),
child: AnimSearchBar(
width: 400,
textFieldColor: iconColor,
textController: textEditingController,
color: iconColor,
onSuffixTap: () {
setState(() {
textEditingController.clear();
});
}, onSubmitted: (String ) { },
),
),*/
/* IconButton(
onPressed: () {},
icon: Icon(
Icons.search,
color: iconColor,
),
),*/
Padding(
padding: const EdgeInsets.all(8.0),
child: IconButton(
Expand All @@ -50,7 +85,7 @@ class CustomAppBar extends StatelessWidget implements PreferredSizeWidget {
Icons.notification_add,
color: iconColor,
)),
)
),
],
);
}
Expand Down
8 changes: 8 additions & 0 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.11.2"
anim_search_bar:
dependency: "direct main"
description:
name: anim_search_bar
sha256: f44954e19fbccdc6d87705c069bdd6395a994576098ce155faf91c4f0f399e46
url: "https://pub.dev"
source: hosted
version: "2.0.3"
args:
dependency: transitive
description:
Expand Down
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ dependencies:
isar:
get_it:
isar_flutter_libs:
anim_search_bar:
# path_provider:
# sqlite3_flutter_libs:
# sqflite_common_ffi_web:
Expand Down

0 comments on commit d39da26

Please sign in to comment.