Help with writing a simple flickering effect

I finally got my segmented gradient effect working. Only thing missing is a flickering effect like in this video
NeoPixel Fire Effect! - YouTube but for the FastLED library.

Just writing “flicker” won’t do anything sadly, could someone please write me that line of code I need to paste it on top of my gradient effect? Would be much appreciated!

Here is my code, I am using a Trinket Pro 5V and a WS2812 LED strip.

#include "FastLED.h"                                          // FastLED library.

#if FASTLED_VERSION < 3001000
#error "Requires FastLED 3.1 or later; check github for latest code."

#define LED_DT 6                                              // Data pin to connect to the strip.
#define COLOR_ORDER GRB                                       // It's GRB for WS2812
#define LED_TYPE WS2812                                       // Using WS2812. Don't forget to change LEDS.addLeds.
#define NUM_LEDS 64                                           // Number of LED's.

uint8_t max_bright = 500;                                     // Overall brightness definition. It can be changed on the fly.

struct CRGB leds[NUM_LEDS];                                   // Initialize our LED array.

// Colours defined for below
CRGB rgbval(255,85,0);
uint8_t startpos = 0;
int endpos = NUM_LEDS-1;

void setup() {

  Serial.begin(115200);                                       // Initialize serial port for debugging.
  delay(1000);                                                // Soft startup to ease the flow of electrons.

LEDS.addLeds<WS2812, LED_DT, COLOR_ORDER>(leds, NUM_LEDS);    // Use this for WS2812
  FastLED.setMaxPowerInVoltsAndMilliamps(5, 500);               

} // setup()

void loop () {                                              

  fill_solid(leds,25, CRGB::Red);
  fill_solid(leds+25, 39, rgbval);

  fill_gradient_RGB(leds+25, 21, CRGB(255,0,0), CRGB(255,85,0));;                                             // Power managed display

} // loop()

Can't help you with the flicker.

But the value 500 does not fit in an uint8_t.

uint8_t max_bright = 500;                                     // Overall brightness definition. It can be changed on the fly.

The compiler even warns you if you increase the warning level in file->preferences in the IDE

C:\Users\Sterretje\AppData\Local\Temp\arduino_modified_sketch_134601\sketch_may04a.ino:12:22: warning: large integer implicitly truncated to unsigned type [-Woverflow]

As the setBrigthtness method accepts an uint8_t, the maximum value will be 255.

Oh okay, didn't know. Strangely I see no warning message in my Arduino software, but I will change the value to 255! Thank you