GithubHelp home page GithubHelp logo

jajpa / flutter_show_more Goto Github PK

View Code? Open in Web Editor NEW
7.0 1.0 3.0 1.22 MB

Flutter widget for limiting the amount of text to show

Home Page: https://pub.dartlang.org/packages/flutter_show_more

License: MIT License

Java 4.41% Objective-C 9.12% Dart 86.47%

flutter_show_more's Introduction

flutter_show_more

Flutter widget for limiting the amount of text to show.

pub package

Installation

Add this to your package's pubspec.yaml file

dependencies:
  ...
  flutter_show_more: ^latest.version.here

Usage

First import show_more.dart

import 'package:flutter_show_more/flutter_show_more.dart';

ShowMoreText with all attributes

ShowMoreText(
  veryLongText,
  maxLength: 100,
  style: TextStyle(fontSize: 12, color: Colors.grey),
  showMoreText: 'show more',
  showMoreStyle: TextStyle(
  fontSize: 12,
    fontWeight: FontWeight.bold,
    color: Theme.of(context).accentColor,
  ),
  shouldShowLessText: true,
  showLessText: 'show less',
),

Screenshots

License

MIT License

flutter_show_more's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

flutter_show_more's Issues

showLessText displays wrong label

Hey, so while writing a few tests for your plugin (I'll send a PR soon :D). The following code results in the wrong label being displayed:

ShowMoreText(
                "Visible - This is the full text.", 
                maxLength: 7,
                shouldShowLessText: true,
                showMoreText: 'Mehr anzeigen',
                showLessText: 'Weniger anzeigen',
              ),
            ),

Plugin version: flutter_show_more: ^0.1.2
Flutter doctor output: (flutter doctor -v)

[✓] Flutter (Channel stable, v1.12.13+hotfix.8, on Mac OS X 10.15.2 19C57, locale en-DE)
    • Flutter version 1.12.13+hotfix.8 at /Users/lunaticcoding/Developer/flutter
    • Framework revision 0b8abb4724 (6 weeks ago), 2020-02-11 11:44:36 -0800
    • Engine revision e1e6ced81d
    • Dart version 2.7.0

 
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0-rc1)
    • Android SDK at /Users/lunaticcoding/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 30.0.0-rc1
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.3, Build version 11C29
    • CocoaPods version 1.8.4

[✓] Android Studio (version 3.6)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 44.0.2
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

[✓] IntelliJ IDEA Community Edition (version 2019.3.2)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 43.0.3
    • Dart plugin version 193.6015.53

[✓] Connected device (1 available)
    • iPhone 11 Pro Max • 3524ECAF-3465-402B-9EAD-81E2837421B4 • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-3 (simulator)

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.