fixed project structure issues. now removing flutterflow dependencies.
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import 'no_chats_model.dart';
|
||||
export 'no_chats_model.dart';
|
||||
|
||||
class NoChatsWidget extends StatefulWidget {
|
||||
const NoChatsWidget({
|
||||
super.key,
|
||||
this.icon,
|
||||
String? title,
|
||||
String? body,
|
||||
}) : title = title ?? 'No Comments',
|
||||
body = body ?? 'There are no comments associated with this post.';
|
||||
|
||||
final Widget? icon;
|
||||
final String title;
|
||||
final String body;
|
||||
|
||||
@override
|
||||
State<NoChatsWidget> createState() => _NoChatsWidgetState();
|
||||
}
|
||||
|
||||
class _NoChatsWidgetState extends State<NoChatsWidget> {
|
||||
late NoChatsModel _model;
|
||||
|
||||
@override
|
||||
void setState(VoidCallback callback) {
|
||||
super.setState(callback);
|
||||
_model.onUpdate();
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_model = createModel(context, () => NoChatsModel());
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_model.maybeDispose();
|
||||
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Align(
|
||||
alignment: const AlignmentDirectional(0, -1),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
widget.icon!,
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0, 16, 0, 0),
|
||||
child: Text(
|
||||
widget.title,
|
||||
textAlign: TextAlign.center,
|
||||
style: FlutterFlowTheme.of(context).headlineSmall.override(
|
||||
fontFamily: 'Outfit',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(16, 8, 16, 0),
|
||||
child: Text(
|
||||
widget.body,
|
||||
textAlign: TextAlign.center,
|
||||
style: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user