Mushtaq Ahmad
Mushtaq Ahmad

Reputation: 15

The argument type TextStyle cannot be assigned to the Parameter type TextStyle? in flutter

When I use textstyle() function I am facing problem 'The argument type TextStyle cannot be assigned to the Parameter type TextStyle?'. please solve my problem . this is my textstyle function.

import 'dart:ui';

TextStyle mTextSyle15(){
  return TextStyle(
    fontSize: 15,
  );
}

TextStyle mTextSyle25(){
  return TextStyle(
    fontSize: 25,
  );
}

TextStyle mTextSyle20(){
  return TextStyle(
    fontSize: 20,
  );
}

and i am putting it here

Text('Text 15', style: **mTextSyle15()**,), 

I am facing problem here mTextStyle15(),

Upvotes: 0

Views: 23

Answers (0)

Related Questions