Home > Net >  Flutter :How to change the size of text from specific text in a list of strings?
Flutter :How to change the size of text from specific text in a list of strings?

Time:10-24

Hello I want to show how I will change the text style of this in the list of strings ١۝۷ع in last line

static final List Fatiha = [ 'اَلْحَمْدُ لِلّٰهِ رَبِّ الْعٰلَمِیْنَۙ۝۱', 'الرَّحْمٰنِ الرَّحِیْمِۙ۝۲', 'مٰلِكِ یَوْمِ الدِّیْنِؕ۝۳', 'اِیَّاكَ نَعْبُدُ وَ اِیَّاكَ نَسْتَعِیْنُؕ۝۴', 'اِهْدِنَا الصِّرَاطَ الْمُسْتَقِیْمَۙ۝۵', 'صِرَاطَ الَّذِیْنَ اَنْعَمْتَ عَلَیْهِمْ ۙ۬ۦ', 'غَیْرِ الْمَغْضُوْبِ عَلَیْهِمْ وَ لَا الضَّآلِّیْنَ۠١۝۷ع' ];

CodePudding user response:

If you want to Change Style In the UI, Then you have to Show Strings In the Text("String",TexStyle(fontSize,FontFamily,,etc)) But If you want to See in the Code Editor for better Visibility then you have to Adjust The Code Editor Zoom Level using Control ,

CodePudding user response:

Text.rich(
          TextSpan(
            style: style1,
            children: [
              TextSpan(
                text:
                    $firstPart',
              ),
              TextSpan(
                text: '$partYouWantDifferentStyle',
                style: style2,
              ),
              TextSpan(
                text: '$lastPart',
              )
            ],
          ),
          textDirection: TextDirection.rtl,
        )
  • Related