abdelaziz-mahdy / flutter_meedu_videoplayer

Cross-Platform Video Player for flutter
https://abdelaziz-mahdy.github.io/flutter_meedu_videoplayer/
MIT License
132 stars 69 forks source link

How to change language for videoFit.value.name #160

Closed ijuniorfu closed 10 months ago

ijuniorfu commented 10 months ago
RxBuilder(
        //observables: [_.showSwipeDuration],
        //observables: [_.swipeDuration],
        (__) => Align(
          alignment: Alignment.center,
          child: AnimatedOpacity(
            duration: _.durations.videoFitOverlayDuration,
            opacity: _.videoFitChanged.value ? 1 : 0,
            child: Visibility(
              visible: _.videoFitChanged.value,
              child: Container(
                color: Colors.grey[900],
                child: Padding(
                  padding: const EdgeInsets.all(8.0),
                  child: Text(
                    _.videoFit.value.name[0].toUpperCase() +
                        _.videoFit.value.name.substring(1),
                    style: const TextStyle(color: Colors.white, fontSize: 16),
                  ),
                ),
              ),
            ),
          ),
        ),
      )

i want show videoFit.value.name to another language, how can i do?

abdelaziz-mahdy commented 10 months ago

This is the enum from flutter, so the best fix in mind is make a map for each name to your language

Keeping in mind the text on screen will be the same, I don't think I made it customizable

I am very sorry, I didn't understand correctly, if you can make a pr to be able to customize the widget that will be awesome, sadly I can only work on it on weekends, and sometimes I don't have enough time

ijuniorfu commented 10 months ago

anyway, thank you!