1- Go to flutter\bin\cache
and remove a file named: flutter_tools.stamp
2- Go to flutter\packages\flutter_tools\lib\src\web
and open the file chrome.dart
.
3- Find '--disable-extensions'
4- Add '--disable-web-security'
1- Go to flutter\bin\cache
and remove a file named: flutter_tools.stamp
2- Go to flutter\packages\flutter_tools\lib\src\web
and open the file chrome.dart
.
3- Find '--disable-extensions'
4- Add '--disable-web-security'
EDITED : 27-Dec-18
for package name just change in build build.gradle
only
defaultConfig {
applicationId "your.package.name"
minSdkVersion 16
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
Widget html = Html(
data: """
<h3>Display bird element and flutter element <bird></bird></h3>
<flutter></flutter>
<flutter horizontal></flutter>
""",
customRender: {
"bird": (RenderContext context, Widget child) {
return TextSpan(text: "🐦");
},
"flutter": (RenderContext context, Widget child) {
return FlutterLogo(
style: (context.tree.element!.attributes['horizontal'] != null)
? FlutterLogoStyle.horizontal
: FlutterLogoStyle.markOnly,
textColor: context.style.color!,
size: context.style.fontSize!.size! * 5,
);
},
},
tagsList: Html.tags..addAll(["bird", "flutter"]),
);
Html(
data: newsVM.newsDetailResponse.data
.news.description,
style: {
"body": Style(
margin: EdgeInsets.zero,
padding: EdgeInsets.zero,
)
},
),