File tree Expand file tree Collapse file tree 4 files changed +62
-12
lines changed
Expand file tree Collapse file tree 4 files changed +62
-12
lines changed Original file line number Diff line number Diff line change 1+ import 'package:flutter/material.dart' ;
2+
3+ class MobileAdWidget extends StatelessWidget {
4+ const MobileAdWidget ({super .key});
5+
6+ @override
7+ Widget build (BuildContext context) {
8+ return Container (
9+ margin: const EdgeInsets .symmetric (vertical: 16 ),
10+ decoration: BoxDecoration (
11+ color: Colors .grey[300 ],
12+ border: Border .all (color: Colors .black26),
13+ borderRadius: BorderRadius .circular (8 ),
14+ ),
15+ child: const Center (
16+ child: Text (
17+ 'Dummy Ad Banner' ,
18+ style: TextStyle (
19+ fontSize: 16 ,
20+ color: Colors .black54,
21+ fontWeight: FontWeight .bold,
22+ ),
23+ ),
24+ ),
25+ );
26+ }
27+ }
Original file line number Diff line number Diff line change 1+ import 'package:doffa/widgets/ad/mobile_ad_widget.dart' ;
2+ import 'package:doffa/widgets/ad/web_ad_widget.dart' ;
13import 'package:doffa/widgets/my_container.dart' ;
2- import 'package:doffa/widgets/text/my_montserrat .dart' ;
4+ import 'package:flutter/foundation .dart' ;
35import 'package:flutter/material.dart' ;
46
57class MyAds extends StatelessWidget {
@@ -12,17 +14,7 @@ class MyAds extends StatelessWidget {
1214 double maxWidth = constraints.maxWidth;
1315 return MyContainer (
1416 maxWidth: maxWidth,
15- child: Padding (
16- padding: const EdgeInsets .symmetric (vertical: 32 , horizontal: 16 ),
17- child: Center (
18- child: MyMontserrat (
19- maxWidth: maxWidth,
20- text: "Google Ads" ,
21- sizeFactor: 12 ,
22- fontWeight: FontWeight .w400,
23- ),
24- ),
25- ),
17+ child: kIsWeb ? WebAdWidget () : MobileAdWidget (),
2618 );
2719 },
2820 );
Original file line number Diff line number Diff line change 1+ import 'package:flutter/material.dart' ;
2+
3+ class WebAdWidget extends StatelessWidget {
4+ const WebAdWidget ({super .key});
5+
6+ @override
7+ Widget build (BuildContext context) {
8+ return Container (
9+ width: 320 ,
10+ height: 100 ,
11+ margin: const EdgeInsets .symmetric (vertical: 16 ),
12+ decoration: BoxDecoration (
13+ color: Colors .grey[300 ],
14+ border: Border .all (color: Colors .black26),
15+ borderRadius: BorderRadius .circular (8 ),
16+ ),
17+ child: const Center (
18+ child: Text (
19+ 'Dummy Ad Banner' ,
20+ style: TextStyle (
21+ fontSize: 16 ,
22+ color: Colors .black54,
23+ fontWeight: FontWeight .bold,
24+ ),
25+ ),
26+ ),
27+ );
28+ }
29+ }
Original file line number Diff line number Diff line change 2525 < meta name ="mobile-web-app-capable " content ="yes ">
2626 < meta name ="apple-mobile-web-app-status-bar-style " content ="black ">
2727 < meta name ="apple-mobile-web-app-title " content ="doffa ">
28+ < meta name ="google-adsense-account " content ="ca-pub-9440501180660894 ">
29+
2830 < link rel ="apple-touch-icon " href ="icons/Icon-192.png ">
2931
3032 <!-- Favicon -->
You can’t perform that action at this time.
0 commit comments