Skip to content

Commit

Permalink
update Group_explore.dart and home.dart
Browse files Browse the repository at this point in the history
  • Loading branch information
Aquarius-blake committed Dec 2, 2023
1 parent 445791f commit 89f0d85
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 10 deletions.
25 changes: 16 additions & 9 deletions lib/Screens/Home/Mobilepages/Group_explore.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,17 @@ class _GroupExploreState extends State<GroupExplore> {
BannerAd? _bannerAd;

Widget ad(index){
if ((_bannerAd != null) && (index % 6 == 0)){
return Align(
alignment: Alignment.topCenter,
child: Container(
width: _bannerAd!.size.width.toDouble(),
height: _bannerAd!.size.height.toDouble(),
child: AdWidget(ad: _bannerAd!),
if ((_bannerAd != null) && (index == 0)){
return StatefulBuilder(
builder: (context,setState) => Align(
alignment: Alignment.topCenter,
child: Container(
width: _bannerAd!.size.width.toDouble(),
height: _bannerAd!.size.height.toDouble(),
child: new AdWidget(ad: _bannerAd!,),
),
),
);
);
} else {
return Container();
}
Expand All @@ -41,7 +43,7 @@ class _GroupExploreState extends State<GroupExplore> {
listener: BannerAdListener(
onAdLoaded: (ad) {
setState(() {
_bannerAd = ad as BannerAd;
_bannerAd = ad as BannerAd;
});
},
onAdFailedToLoad: (ad, err) {
Expand All @@ -54,6 +56,11 @@ class _GroupExploreState extends State<GroupExplore> {
super.initState();
}

@override
void dispose() {
super.dispose();
}

@override
Widget build(BuildContext context) {
late UserThemeData themedata= Provider.of<ThemeProvider>(context).getUserThemeData;
Expand Down
25 changes: 24 additions & 1 deletion lib/Screens/Home/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import 'package:forum3/Models/Settings.dart';
import 'package:forum3/Models/Users1.dart';
import 'package:forum3/Provider/Settings_provider.dart';
import 'package:forum3/Screens/Forum/Dynamiclink_page.dart';
import 'package:forum3/Screens/Home/Mobilepages/Group_explore.dart';
import 'package:forum3/Screens/Home/Mobilepages/Group_page.dart';
import 'package:forum3/Screens/Home/Mobilepages/Group_search.dart';
import 'package:forum3/Screens/Home/Mobilepages/MDprofile.dart';
Expand All @@ -27,7 +28,6 @@ import 'package:forum3/Services/Upload.dart';
import 'package:forum3/shared/Networkconnection.dart';
import 'package:forum3/shared/Pop_up.dart';
import 'package:get/get.dart';
import 'package:google_mobile_ads/google_mobile_ads.dart';
import 'package:image_picker/image_picker.dart';
import 'package:line_icons/line_icons.dart';
import 'package:package_info_plus/package_info_plus.dart';
Expand Down Expand Up @@ -359,6 +359,29 @@ class _HomeState extends State<Home> {
},
),
const SizedBox(
height: 5.0,
),ListTile(
leading: FaIcon(
FontAwesomeIcons.compass,
color: Color(themedata.DrawerIconColor!),
size:35.0,
),
title: Text(
"Explore Colonies",
style:TextStyle(
color: Color(themedata.DrawerTextColor!),
fontSize: 22.0,
)
),
onTap: ()async{
Navigator.of(context).push(
MaterialPageRoute(
builder: (context)=>GroupExplore(),
)
);
},
),
SizedBox(
height: 5.0,
),
ListTile(
Expand Down

0 comments on commit 89f0d85

Please sign in to comment.