Coder Social home page Coder Social logo

hathibelagal-dev / css_text_for_flutter Goto Github PK

View Code? Open in Web Editor NEW
55.0 4.0 16.0 527 KB

This Flutter library allows you to use CSS to style your text

Home Page: https://pub.dev/packages/css_text

License: Apache License 2.0

Objective-C 0.06% Dart 30.68% Shell 0.80% Kotlin 0.18% Swift 2.54% CMake 27.51% C++ 33.44% C 2.09% HTML 2.70%
flutter css html dart

css_text_for_flutter's People

Contributors

carlit0 avatar hathibelagal-ash avatar hathibelagal-dev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

css_text_for_flutter's Issues

option to pass TextStyle parameter in the toTextSpan method

Hi there,
Can you help me change the definition of toTextSpan method. I want to change the theme based on the dark and light theme which would be only posssible with the below code:

static TextSpan toTextSpan(BuildContext context, String htmlContent,TextStyle textStyle,
{Function linksCallback}) {
Parser p = Parser(context, htmlContent, linksCallback: linksCallback);
return TextSpan(style:textStyle, text: "", children: p.parse());
}

Image support

Does this package support images? I tried to preview an image but it is now showing. If so then please let me know how to show images. btw thanks for this awesome package.

请问一下他支持渐变吗


This text is slightly transparent, and has a slightly transparent background too.

我添加了linear-gradient,可是并没有支持

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: [
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));

}
}

Target of URI doesn't exist: css_text.dart

After running flutter pub get getting following error
Target of URI doesn't exist: 'package:css_text/css_text.dart'. Try creating the file referenced by the URI, or Try using a URI for a file that does exist.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.