import '/flutterlib/flutter_theme.dart';
import '/flutterlib/flutter_util.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:provider/provider.dart';
import 'no_permission_model.dart';
export 'no_permission_model.dart';

class NoPermissionWidget extends StatefulWidget {
  const NoPermissionWidget({Key? key}) : super(key: key);

  @override
  _NoPermissionWidgetState createState() => _NoPermissionWidgetState();
}

class _NoPermissionWidgetState extends State<NoPermissionWidget> {
  late NoPermissionModel _model;

  @override
  void setState(VoidCallback callback) {
    super.setState(callback);
    _model.onUpdate();
  }

  @override
  void initState() {
    super.initState();
    _model = createModel(context, () => NoPermissionModel());
  }

  @override
  void dispose() {
    _model.maybeDispose();

    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    context.watch<FFAppState>();

    return Padding(
      padding: EdgeInsetsDirectional.fromSTEB(0.0, 20.0, 0.0, 20.0),
      child: Column(
        mainAxisSize: MainAxisSize.max,
        children: [
          Container(
            decoration: BoxDecoration(
              color: FlutterTheme.of(context).alternate,
              shape: BoxShape.circle,
            ),
            child: ClipRRect(
              borderRadius: BorderRadius.circular(8.0),
              child: SvgPicture.asset(
                'assets/images/pp.svg',
                width: 200.0,
                height: 200.0,
                fit: BoxFit.contain,
              ),
            ),
          ),
          Expanded(
            child: Align(
              alignment: AlignmentDirectional(0.0, -1.0),
              child: Padding(
                padding: EdgeInsetsDirectional.fromSTEB(0.0, 5.0, 0.0, 0.0),
                child: Text(
                  FFLocalizations.of(context).getText(
                    'b9fp2z8u' /* Your role doesn't have 
this p... */
                    ,
                  ),
                  textAlign: TextAlign.center,
                  style: FlutterTheme.of(context).bodyMedium.override(
                        fontFamily: 'Readex Pro',
                        color: FlutterTheme.of(context).secondaryText,
                        fontSize: 24.0,
                        fontWeight: FontWeight.w600,
                      ),
                ),
              ),
            ),
          ),
        ],
      ),
    );
  }
}
