1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Flutter] exception occurred in flutter app how i can solved it?

Discussão em 'Mobile' iniciado por Stack, Outubro 6, 2024 às 21:12.

  1. Stack

    Stack Membro Participativo

    FlutterError (A RenderRepaintBoundary expected a child of type RenderBox but received a child of type RenderSliverToBoxAdapter. RenderObjects expect specific types of children because they coordinate with their children during layout and paint. For example, a RenderSliver cannot be the child of a RenderBox because a RenderSliver does not understand the RenderBox layout protocol.

    The RenderRepaintBoundary that expected a RenderBox child was created by: RepaintBoundary ← IndexedSemantics ← _SelectionKeepAlive ← NotificationListener ← KeepAlive ← AutomaticKeepAlive ← KeyedSubtree ← SliverList ← Viewport ← IgnorePointer-[GlobalKey#4ddb3] ← Semantics ← Listener ← ⋯

    The RenderSliverToBoxAdapter that did not match the expected child type was created by: SliverToBoxAdapter ← News_List_View ← RepaintBoundary ← IndexedSemantics ← _SelectionKeepAlive ← NotificationListener ← KeepAlive ← AutomaticKeepAlive ← KeyedSubtree ← SliverList ← Viewport ← IgnorePointer-[GlobalKey#4ddb3] ← ⋯)

    this my code i'm already used SliverToBoxAdapter but this exception still

    @override Widget build(BuildContext context) { return isLoading ? const SliverToBoxAdapter( child: Center(child:CircularProgressIndicator())) : SliverList( delegate: SliverChildBuilderDelegate(childCount: articles.length, (context, index) { return Padding( padding: const EdgeInsets.only(bottom: 22), child: NewsTile( articleModel: articles[index], ), ); })); } }

    Continue reading...

Compartilhe esta Página