Created
February 28, 2023 13:34
-
-
Save anoochit/14148c5a36d7b1100c97de00565051f7 to your computer and use it in GitHub Desktop.
FlutterFlow - Avatar Maker Custom widgets for
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Automatic FlutterFlow imports | |
import '/flutter_flow/flutter_flow_theme.dart'; | |
import '/flutter_flow/flutter_flow_util.dart'; | |
import '/custom_code/widgets/index.dart'; // Imports other custom widgets | |
import '/flutter_flow/custom_functions.dart'; // Imports custom functions | |
import 'package:flutter/material.dart'; | |
// Begin custom widget code | |
// DO NOT REMOVE OR MODIFY THE CODE ABOVE! | |
import 'package:flutter_svg/flutter_svg.dart'; | |
class AvatarLayoutWidget extends StatefulWidget { | |
const AvatarLayoutWidget({ | |
Key? key, | |
this.width, | |
this.height, | |
}) : super(key: key); | |
final double? width; | |
final double? height; | |
@override | |
_AvatarLayoutWidgetState createState() => _AvatarLayoutWidgetState(); | |
} | |
class _AvatarLayoutWidgetState extends State<AvatarLayoutWidget> { | |
@override | |
Widget build(BuildContext context) { | |
return Stack( | |
children: [ | |
// skin | |
SvgPicture.network( | |
FFAppState().skinLayout[FFAppState().skinIndex], | |
width: widget.width, | |
height: widget.height, | |
), | |
// cloth | |
SvgPicture.network( | |
FFAppState().clothLayout[FFAppState().clothIndex], | |
width: widget.width, | |
height: widget.height, | |
), | |
// eye | |
SvgPicture.network( | |
FFAppState().eyeLayout[FFAppState().eyeIndex], | |
width: widget.width, | |
height: widget.height, | |
), | |
// mouth | |
SvgPicture.network( | |
FFAppState().mouthLayout[FFAppState().mouthIndex], | |
width: widget.width, | |
height: widget.height, | |
), | |
// hair | |
SvgPicture.network( | |
FFAppState().hairLayout[FFAppState().hairIndex], | |
width: widget.width, | |
height: widget.height, | |
), | |
], | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment