Я новичок в флаттере. Я пытаюсь создать собственный виджет панели приложений и импортировать виджет на страницы.
Но мне не удалось создать виджет.
import 'package:flutter/material.dart';
class AppBar extends StatelessWidget{
@override
Widget build(BuildContext context){
return AppBar(
title: Text('Ordering'),
actions: <Widget>[
IconButton(
onPressed: _incrementCounter,
icon: Icon(Icons.add),
),
BadgeIconButton(
itemCount: _counter,
badgeColor: Color.fromRGBO(37, 134, 16, 1.0),
badgeTextColor: Colors.white,
icon: Icon(Icons.shopping_cart, size: 30.0,),
onPressed: () {}
),
],
);
} }'