TextMetadata.combineWhereNotEqual constructor

TextMetadata.combineWhereNotEqual(
  1. TextMetadata metadata1,
  2. TextMetadata metadata2, {
  3. bool favourFirst = true,
})

Implementation

factory TextMetadata.combineWhereNotEqual(
  final TextMetadata metadata1,
  final TextMetadata metadata2, {
  bool favourFirst = true,
}) {
  return TextMetadata(
    color: favourFirst ? metadata1.color : metadata2.color,
    fontWeight: favourFirst ? metadata1.fontWeight : metadata2.fontWeight,
    fontStyle: favourFirst ? metadata1.fontStyle : metadata2.fontStyle,
    fontSize: favourFirst ? metadata1.fontSize : metadata2.fontSize,
    decoration: favourFirst ? metadata1.decoration : metadata2.decoration,
    fontFeatures:
        favourFirst ? metadata1.fontFeatures : metadata2.fontFeatures,
    alignment: favourFirst ? metadata1.alignment : metadata2.alignment,
  );
}