This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:flutter/material.dart'; | |
| void main() { | |
| runApp(const MyApp()); | |
| } | |
| class MyApp extends StatelessWidget { | |
| const MyApp({super.key}); | |
| @override |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class NavigationItem { | |
| final String url; | |
| final String label; | |
| final List<NavigationItem> children; | |
| NavigationItem({ | |
| required this.url, | |
| required this.children, | |
| required this.label, | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class NavigationItem { | |
| final String url; | |
| final String label; | |
| final List<NavigationItem> children; | |
| NavigationItem( | |
| {required this.url, required this.children, required this.label}); | |
| @override | |
| String toString() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class NavigationItem { | |
| final String url; | |
| final String label; | |
| final List<NavigationItem> children; | |
| NavigationItem( | |
| {required this.url, required this.children, required this.label}); | |
| @override | |
| String toString() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'dart:convert'; | |
| void printToString(Object ex ){ | |
| print(ex.toString()); | |
| } | |
| class MyCustomExceptionObject { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class InheritedBlocs extends InheritedWidget { | |
| InheritedBlocs( | |
| {Key key, | |
| this.searchBloc, | |
| this.child}) | |
| : super(key: key, child: child); | |
| final Widget child; | |
| final SearchBloc searchBloc; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class CustomSearchDelegate extends SearchDelegate { | |
| @override | |
| ThemeData appBarTheme(BuildContext context) { | |
| assert(context != null); | |
| final ThemeData theme = Theme.of(context); | |
| assert(theme != null); | |
| return theme; | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class CustomSearchDelegate extends SearchDelegate { | |
| @override | |
| List<Widget> buildActions(BuildContext context) { | |
| return [ | |
| IconButton( | |
| icon: Icon(Icons.clear), | |
| onPressed: () { | |
| query = ''; | |
| }, | |
| ), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class CustomSearchDelegate extends SearchDelegate { | |
| @override | |
| List<Widget> buildActions(BuildContext context) { | |
| // TODO: implement buildActions | |
| return null; | |
| } | |
| @override | |
| Widget buildLeading(BuildContext context) { | |
| // TODO: implement buildLeading |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SliverAppBar( | |
| floating: true, | |
| snap: true, | |
| title: Text("Search App"), | |
| actions: <Widget>[ | |
| IconButton( | |
| icon: Icon(Icons.search), | |
| onPressed: () { | |
| showSearch( | |
| context: context, |