homeMenuBG static method

BackgroundModel homeMenuBG(
  1. String bgName,
  2. RgbModel appColor1,
  3. RgbModel appColor2
)

Implementation

static BackgroundModel homeMenuBG(
    String bgName, RgbModel appColor1, RgbModel appColor2) {
  // this is a clone of _pageBG
  var decorationColorModels = <DecorationColorModel>[];
  var decorationColorModel1 = DecorationColorModel(
    documentID: '1',
    color: appColor1,
    stop: .1,
  );
  decorationColorModels.add(decorationColorModel1);
  var decorationColorModel2 = DecorationColorModel(
    documentID: '2',
    color: appColor2,
    stop: .9,
  );

  decorationColorModels.add(decorationColorModel2);
  var backgroundModel = BackgroundModel(
    beginGradientPosition: StartGradientPosition.centerLeft,
    endGradientPosition: EndGradientPosition.centerRight,
    decorationColors: decorationColorModels,
    shadow: shadowModel(),
  );
  return backgroundModel;
}