css_text_for_flutter
css_text_for_flutter copied to clipboard
why this is not working in sliver app bar
import 'package:flutter/material.dart'; import 'package:css_text/css_text.dart';
void main() { runApp(MaterialApp( title: 'Androidmonks', home: Scaffold( body: CustomScrollView( slivers: <Widget>[ SliverAppBar(
backgroundColor: Colors.orangeAccent,
floating: true,
actions: <Widget>[
_Home(),
],
),
],
),
)));
}
class _Home extends StatelessWidget { @override Widget build(BuildContext context) { String htmlContent = """
Hello World!!
How are you today?
But why are you doing this?
Can you tell me?
Please visit Flutter docs
This text is slightly transparent, and has a slightly transparent background too.
var myRichText =
HTML.toRichText(context, htmlContent, linksCallback: (link) {
print("You clicked on $link");
});
return Scaffold(
body: Container(padding: EdgeInsets.all(16.0), child: myRichText));
} }