import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/src/widgets/container.dart';
import 'package:flutter/src/widgets/framework.dart';
import 'package:safehandsv2/utils/quotes.dart';
class CustomAppBar extends StatelessWidget {
//const CustomAppBar({super.key});
Function? onTap;
int? quoteIndex;
CustomAppBar({this.onTap, this.quoteIndex});
@override
Widget build(BuildContext context) {
return InkWell(
onTap:() {
**onTap!();**
},
child: Text(sweetSayings[quoteIndex!],
style: TextStyle(fontSize: 22, ),
),
);
}
}
so here the error I'm getting is null not defined etc.
error - Exception has occurred.
_CastError (Null check operator used on a null value)