Fat Shorthand Get link Facebook X Pinterest Email Other Apps December 05, 2023 /// Fat Arrow Notationvoid main() { print(add(10,50));}int add(var a, var b) => a + b;//Fat arrow notation is used only for single expression Get link Facebook X Pinterest Email Other Apps Comments
Second GET API Calling with Bloc simple Example in Flutter June 05, 2024 import "package:api_with_bloc/Fourth_Get_API_call_using_Bloc/bloc/users_bloc.dart" ; import "package:api_with_bloc/Fourth_Get_API_call_using_Bloc/bloc/users_bloc_states.dart" ; import "package:flutter/material.dart" ; import "package:flutter_bloc/flutter_bloc.dart" ; void main () { runApp ( const MyApp () ) ; } class MyApp extends StatelessWidget { const MyApp ( { super .key } ) ; @override Widget build ( BuildContext context ) { return BlocProvider < UsersBloc >( create: ( context ) => UsersBloc () , child: MaterialApp ( title: "HomePage" , debugShowCheckedModeBanner: false, theme: ThemeData ( appBarTheme: const AppBarTheme ( backgroundColor: Colors. grey , centerTitle: true, ) , ) , home: const HomePageFourth () , ) , ) ; } } class HomePageFourth extends StatelessWidget { const HomePageFourth ( { super .... Read more
Stack Container Scrollable Card widget UI with Custom Widget April 03, 2024 import "package:flutter/material.dart" ; void main () { runApp( const MyApp ()) ; } class MyApp extends StatelessWidget { const MyApp({ super .key}) ; @override Widget build (BuildContext context) { return MaterialApp ( title: "Card Container Stack" , debugShowCheckedModeBanner: false, theme: ThemeData ( appBarTheme: const AppBarTheme ( backgroundColor: Colors. grey , centerTitle: true, ) , ) , home: const CardContainerStack () , ) ; } } class CardContainerStack extends StatelessWidget { const CardContainerStack({ super .key}) ; @override Widget build (BuildContext context) { return Scaffold ( appBar: AppBar ( title: const Text ( "Scrollable Containers" , style: TextStyle (fontWeight: FontWeight. bold ) , ) , ) , body: SingleChildScrollView ( child: Center ( child: Column ( mainA... Read more
Pagination with Bloc Pattern in Flutter June 05, 2024 import "package:flutter/material.dart" ; import "package:flutter_bloc/flutter_bloc.dart" ; import "package:pagination_practice/Pagination_with_Bloc/Bloc/bloc.dart" ; import "package:pagination_practice/Pagination_with_Bloc/Bloc/event.dart" ; import "package:pagination_practice/Pagination_with_Bloc/Bloc/state.dart" ; import "package:pagination_practice/Pagination_with_Bloc/post_repo.dart" ; void main () { runApp ( const MyApp () ) ; } class MyApp extends StatelessWidget { const MyApp ( { super .key } ) ; @override Widget build ( BuildContext context ) { return RepositoryProvider < PostRepo >( create: ( context ) => PostRepo () , child: BlocProvider < PostBloc > ( create: ( context ) => PostBloc ( context.read < PostRepo > () ) ..add ( FetchPostsEvent () ) , child: MaterialApp ( title: "Pagination" , debugShowCheckedModeBa... Read more
Comments
Post a Comment