#
Playing other radio, not where i taped radio station

in my radio Radio App 

Playing other radio, not where i taped radio station 

this problem facing when scrolling up radio list in Screenshot, i clicked on Mehra Media Radio But Playing Gurbani Kirtan Radio...


List Page Code

import
'package:flutter/material.dart';

import 'package:flutter_pagewise/flutter_pagewise.dart';

import 'package:google_mobile_ads/google_mobile_ads.dart';

import 'package:just_audio/just_audio.dart';

import 'package:provider/provider.dart';

import 'package:wgr_radio/model/allsongmodel.dart';

import 'package:wgr_radio/pages/home.dart';

import 'package:wgr_radio/pages/musicdetails.dart';

import 'package:wgr_radio/pages/nodata.dart';

import 'package:wgr_radio/provider/allradioviewallprovider.dart';

import 'package:wgr_radio/utils/color.dart';

import 'package:wgr_radio/utils/customwidget.dart';

import 'package:wgr_radio/utils/utils.dart';

import 'package:wgr_radio/widget/myappbar.dart';

import 'package:wgr_radio/widget/mynetworkimg.dart';

import 'package:wgr_radio/widget/mytext.dart';

class AllRadioViewall extends StatefulWidget {

final String title, userid;

const AllRadioViewall({

super.key,

required this.title,

required this.userid,

});

@override
State<AllRadioViewall> createState() => AllRadioViewallState();

}

class AllRadioViewallState extends State<AllRadioViewall> {

late PagewiseLoadController<Result> _pageLoadController;

int pageno = 1;

@override
void initState() {

super.initState();

MobileAds.instance.initialize();

getApi();

}

getApi() async {

_pageLoadController =

PagewiseLoadController(pageSize: 10, pageFuture: fetchAllSongNewData);

}

Future<List<Result>> fetchAllSongNewData(int? nextPage) async {

final allradioprovider =

Provider.of<AllRadioViewAllProvider>(context, listen: false);

pageno = (nextPage ?? 0) + 1;

debugPrint("Pageno =>$pageno");

await allradioprovider.getAllSong(pageno.toString());

return allradioprovider.allSongsModel.result!;

}

@override
Widget build(BuildContext context) {

return Stack(

children: [

Scaffold(

backgroundColor: lightwhite,

body: Column(

children: [

MyAppbar(

isSimpleappbar: 1,

title: widget.title.toString(),

icon: "back.png",

onBack: () {

Navigator.pop(context);

},

),

Expanded(child: allRadioList()),

Utils.showBannerAd(context),

],

),

),

buildMusicPanel(context),

],

);

}

///////////////UP/////////////////////

// All Radio Section //

Widget allRadioList() {

return Consumer<AllRadioViewAllProvider>(

builder: (context, allradioprovider, child) {

if (allradioprovider.loading) {

return allradioListShimmer();

} else {

return PagewiseGridView<Result>.count(

crossAxisCount: 1,

pageLoadController: _pageLoadController,

mainAxisSpacing: 1,

crossAxisSpacing: 1,

childAspectRatio: 10 / 3,

shrinkWrap: true,

noItemsFoundBuilder: (context) {

return const NoData(

text: "thereisnoradiochannels",

);

},

physics: const BouncingScrollPhysics(),

padding: const EdgeInsets.all(8.0),

addRepaintBoundaries: true,

addAutomaticKeepAlives: true,

addSemanticIndexes: true,

loadingBuilder: (context) {

return Utils.pageLoader();

},

itemBuilder: (context, entry, index) {

return InkWell(

onTap: () {

Utils.playAudio(

context,

entry.isPremium ?? 0,

entry.isBuy ?? 0,

entry.image.toString(),

entry.name.toString(),

entry.songUrl.toString(),

entry.languageName.toString(),

entry.artistName.toString(),

entry.id.toString(),

index,

allradioprovider.allSongsModel.result?.toList() ?? [],

);

},

child: Container(

padding: const EdgeInsets.symmetric(vertical: 10),

decoration: const BoxDecoration(

color: Color(0xffbce1ff), // Light Blue color
border: Border(

left: BorderSide(color: Colors.white, width: 1.0),

right: BorderSide(color: Colors.white, width: 1.0),

top: BorderSide(color: Colors.black, width: 1.0),

bottom: BorderSide(color: Colors.red, width: 1.0),

),

),

child: Row(

crossAxisAlignment: CrossAxisAlignment.start,

children: [

ClipRRect(

borderRadius: BorderRadius.circular(5),

child: MyNetworkImage(

imgWidth: MediaQuery.of(context).size.height * 0.12,

imgHeight: MediaQuery.of(context).size.height * 0.16,

imageUrl: entry.image.toString(),

fit: BoxFit.cover,

),

),

const SizedBox(width: 32), // Adjust spacing as needed
Expanded(

child: Column(

crossAxisAlignment: CrossAxisAlignment.start,

children: [

MyText(

color: black,

text: entry.name.toString(),

textalign: TextAlign.left, // Align left
fontsize: 14,

inter: 1,

maxline: 2,

fontwaight: FontWeight.w500,

overflow: TextOverflow.ellipsis,

fontstyle: FontStyle.normal,

),

// Add the ic_play.png image here
SizedBox(

width: 30,

height: 30,

child: Image.asset(

'assets/images/ic_play.png', // Adjust the path based on your project structure
),

),

],

),

),

],

),

),

);

},

);

}

},

);

}

/////////////////Down/////////////////////

Widget allradioListShimmer() {

return SingleChildScrollView(

physics: const BouncingScrollPhysics(),

scrollDirection: Axis.vertical,

child: Column(

children: [

Container(

width: MediaQuery.of(context).size.width,

padding: const EdgeInsets.fromLTRB(15, 15, 15, 15),

alignment: Alignment.topCenter,

child: MediaQuery.removePadding(

context: context,

removeTop: true,

child: GridView.builder(

physics: const NeverScrollableScrollPhysics(),

scrollDirection: Axis.vertical,

shrinkWrap: true,

itemCount: 12,

gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(

crossAxisCount: 3,

childAspectRatio: 5 / 9,

crossAxisSpacing: 5,

mainAxisSpacing: 5),

itemBuilder: (BuildContext ctx, index) {

return Container(

padding: const EdgeInsets.fromLTRB(5, 0, 5, 0),

alignment: Alignment.center,

child: Column(

crossAxisAlignment: CrossAxisAlignment.start,

mainAxisAlignment: MainAxisAlignment.center,

children: [

ClipRRect(

borderRadius: BorderRadius.circular(0),

child: CustomWidget.rectangular(

width: MediaQuery.of(context).size.height * 0.14,

height: MediaQuery.of(context).size.height * 0.14,

),

),

SizedBox(

height: MediaQuery.of(context).size.height * 0.005),

const CustomWidget.roundrectborder(

width: 80,

height: 10,

),

SizedBox(

height: MediaQuery.of(context).size.height * 0.002),

const CustomWidget.roundrectborder(

width: 50,

height: 10,

),

],

),

);

},

),

),

),

],

),

);

}

Widget buildMusicPanel(context) {

return ValueListenableBuilder(

valueListenable: currentlyPlaying,

builder: (BuildContext context, AudioPlayer? audioObject, Widget? child) {

if (audioObject?.audioSource != null) {

return const MusicDetails(

ishomepage: true,

);

} else {

return const SizedBox.shrink();

}

},

);

}

}

ATTACHED FILES

Asked 1 month ago on January 19, 2024 7:41 AM Comments 2 times


  1. Generic placeholder image

    Support replied

    share your admin panel link..

    Regards,
    Support DivineTechs
  2. Generic placeholder image

    Gurpreet Singh replied

    we are wait from 5 months for your App suport reply, if you have no app support

     

    pls refund me,,,then i see another radio app template 

Recent Tickets
Database admin user... 4 days ago on February 22, 2024 4:31 PM Bugs in Patient App Sourc... 4 days ago on February 22, 2024 10:51 AM [core/no-app] No Firebase... 1 week ago on February 13, 2024 10:13 AM offline video not working... 3 weeks ago on January 31, 2024 5:48 PM Admin Panel Issue... 4 weeks ago on January 29, 2024 7:48 AM Unable to access web back... 4 weeks ago on January 27, 2024 2:57 AM Playing other radio, not ... 1 month ago on January 19, 2024 7:41 AM Stripe problem 1 month ago on January 18, 2024 12:42 PM Issue in application comp... 1 month ago on January 5, 2024 6:02 AM Not showing Package detai... 2 months ago on December 23, 2023 6:57 AM