part of user_wrong_des;


class UserWrongDesPage extends StatefulWidget {
  final CourseModel model;
  const UserWrongDesPage({
    Key? key,
    required this.model
  }) : super(key: key);

  @override
  State<UserWrongDesPage> createState() => _UserWrongDesPageState();
}

class _UserWrongDesPageState extends State<UserWrongDesPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: const Text('错题详情'),
        ),
        body: InAppWebView(
          initialUrlRequest: URLRequest(
            url: Uri.parse(kUserWrongDes),
          ),
          onLoadStop: (controller, url) {
            String str = '${widget.model.bookId},${UserStore.to.token}';
            Console.log('传给前端的参数--------------------------------$str');
            controller.evaluateJavascript(source: 'callbackInFlutterComponent("$str");');
          }
        )
    );
  }
}
