import 'package:betting/commom/utils/native_ad_manager.dart';
import 'package:get/get.dart';

class NewsController extends GetxController{
  var indexChange= 0.obs;
  var nativeAds = [].obs;
  @override
  void onInit() {
    for (int i = 0; i < 3; i++) {
      nativeAds.add(NativeAdManager());
    }
    for (var nativeAd in nativeAds) {
      nativeAd.loadAd();
    }

    super.onInit();
  }

  var list = [
    listNew(image: 'assets/images/test.jpg', content:'Locker to leave hospital on thursdaywwwwwwwwwwwddddddddddddddddd', category: 'Baskistball', time:'14 house ago',title:'Top Stories'),
    listNew(image: 'assets/images/test.jpg', content:'Locker to leave hospital on thursdaywwwwwwwww', category: 'Football', time:'14 house ago',title:'MotorsportNews1'),
    listNew(image: 'assets/images/test.jpg', content:'Locker to leave hospital on thursdaywwwwwwwwwwwddddddddddddsssdfsdfsdfsdf', category: 'Football', time:'1 house ago',title:'MotorsportNews2'),
    listNew(image: 'assets/images/test.jpg', content:'Locker to leave hospital on thursdaywwwddddddddddddd', category: 'Baskistball', time:'12 house ago',title:'MotorsportNews3'),
    listNew(image: 'assets/images/test.jpg', content:'Locker to leave hospital on thursdaywwwwwwwwddddddd', category: 'Baskistball', time:'11 house ago',title:'MotorsportNews4'),
  ];


  var list2 =[
    listCate(name: 'All'),
    listCate(name: 'Football'),
    listCate(name: 'Football'),
    listCate(name: 'Volleyball'),
    listCate(name: 'Baskitball'),
    listCate(name: 'Tenis'),
    listCate(name: 'Swimming'),
    listCate(name: 'Running'),

  ];


  @override
  void dispose() {
    for (var nativeAd in nativeAds) {
      if (nativeAd.nativeAd != null) nativeAd.nativeAd!.dispose();
    }
    super.dispose();
  }


}

class listNew{
  String ? image;
  String ? title;
  String ? category;
  String ? time;
  String? content;

  listNew({ required this.image, required this.title, required this.category, required this.time, required this.content});
}


class listCate{
  String ? name;
  listCate({required this.name});
}

